DEHYDRATION
Lack of water can cause muscles to contract.Even day to day functioning requires you to drink more water than usual, which is 8- 10 glasses.
IRON DEFICIENCY
Lack of iron leads to lack of muscle oxygenation,which results cramps. So eat more iron contains products like leafy green vegetables, whole grains, nuts and meat etc.
TRACE MINERALS
Zinc is a trace mineral which is very important for muscular activity,This mineral is found in foods like oysters, crab, red meat , beans and legume.Multivitamin supplement is also good. Also Low Magnesium results in cramps.So one should eat dark leafy vegetables,fish,seeds,nuts,yogurt and bananas.
VITAMIN D DEFICIENCY
Vitamin D helps in maintaining the balance of calcium and phosphorous an. A deficiency of this can cause cramping.Eat egg yolk,fatty fish and cheese.