According to the Encyclopedia of Death and Dying, two to eight hours after death, the body stops producing adenosine triphosphate and muscles begin to stiffen. This occurs in part because oxygen no longer circulates. Other post-mortem biochemical changes also cause abnormal contraction of the muscles because the body is unable to remove the by-product lactose from the muscles to prevent them from stiffening.
Over the next four to six hours, according to the Encyclopedia of Death and Dying, muscles continue to contract until endogenous and bacterial enzymes begin to break down the muscle fibers themselves. During the next six to 12 hours, the muscles continue to decompose, and the body grows cold and relaxes. Usually a decomposing body comes out of rigor mortis in 12 to 36 hours, depending on environmental conditions such as cold weather or extreme heat.
As the Encyclopedia of Death and Dying points out, many factors can affect the onset of rigor mortis, including species, age, gender and physical conditioning. Many infants and small children do not exhibit rigor mortis, perhaps because of their small size. Combined with rigor mortis, the other two phases of the decomposition process are livor mortis, or settling and coagulation of the blood, and algor mortis, or secondary laxity and complete relaxation of the muscles.