Why do muscle cramps occur?

While doing heavy exercise, fast running or any other heavy work the demand for energy is high. But the amount of oxygen to produce the energy is limited, then anaerobic respiration takes place in muscle cells to fulfill the demand of energy. Muscle cramps occur when muscles respire anaerobically. The partial breakdown of glucose into carbon dioxide and water produces lactic acid. The accumulation of lactic acid causes muscle cramps.

Getting relief from muscle cramps

Hot water bath or massage helps improve the blood circulation. As a result more oxygen is supplied to the muscle cells. The increase in the supply of oxygen to the muscle cells results in the complete break down of lactic acid into carbon dioxide and water.

Hope this is useful !! :)
Muscle cramps happen in someone who is sedentary all day long.