I have suffered from leg cramps for years and more recently get them when I eat potatoes! Doctors have assured me that if I increase calcium it should solve the problem, but it isn't as simple as that and high calcium intake can actually cause muscle cramps. Recently a friend, who studies natural remedies, suggested it is lack of magnesium that is causing the problem. But even that isn't a simple solution.
Calcium may not be properly utilized, especially if you are taking in too much calcium. It can accumulate in tissue other than bones and teeth and can cause stiffness in the joints (when I cut down on dairy and switched to almond milk I no longer had stiffness in my knees when sitting for a while) Too much calcium can also block magnesium and too much vitamin D can cause a high calcium level too (there has to be a balance)
Potassium is another important mineral which plays a key role in smooth muscle contraction. Magnesium deficiency can increase potassium loss in the body. (I have found that if I take a magnesium tablet before I eat potatoes I don't get leg cramps)
Take a look at your diet and find a healthy balance of potassium, calcium and magnesium rich foods.
Click on the link for recommended daily allowance:
magnesium (almonds, cashews and peanuts are a good source)
calcium (oatmeal, yogurt, sardines are a good source)
potassium (spinach, sweet potato and banana are a good source)
While blood tests can give you a lot of information about your body as of that day, a hair tissue mineral analysis can show what is stored in your body and the ratio - comparison/calculation of two elements and help you to make changes in your diet to establish a balance of body chemistry. You can purchase the kits online or often at your local health food store.