The exact cause of heat cramps is unknown. They are probably related to electrolyte problems. Electrolytes include various essential minerals, such as sodium, potassium, calcium, and magnesium. They undergo chemical changes in your tissues. An imbalance can cause problems.
Sweat contains a large amount of sodium, and drinking fluids with inadequate sodium content may result in a serious low-sodium condition called hyponatremia. Some factories have virtually eliminated heat cramps in their workers by supplying salt-enriched fluids.