Lack of oxygen after clinical death results in temperature-dependent physiochemical changes in muscles. Energy cannot be produced using oxidative phosphorylation, resulting in the cessation of Adenosine Tri-Phosphate (ATP) production. Anaerobic processes then take overproducing lactic acid as a by-product, leading to increased cellular acidity. This decreased ATP and high acidity cause actin and myosin filaments to bind together and form a gel, giving rise to stiffness in muscles. Shortening does not occur unless the muscle is under tension. Hence, in conditions where muscles are acidic (heavy exercise, electrocution, epileptic seizures) rigor mortis develops faster. In extremes of ages or in emaciation, rigor mortis is hard to detect due to low muscle mass.
source:https://mlt.gov.np/post-mortem-changes/early-post-mortem-interval/rigor-mortis/
source:https://mlt.gov.np/post-mortem-changes/early-post-mortem-interval/rigor-mortis/