Get magnesium citrate (not oxide). You can get it in capsule form, or if you are daring enough go to the laxative section and look for it in bottles... take a tablespoon or two a couple times daily to start building up your magnesium. Anyone who drinks coffee by the pot (Granny) or sweats a lot loses salt, and when salt is lost so goes magnesium. I can sit in an epsom salts bath and collect enough via absorption to get me back in shape.. but I normally take a couple of capsules daily because of the sweating and coffee drinking.. Since starting on it, I haven't had leg or foots cramps in I can't remember how long.
OH!! well lately I have been eating/inhaling lots of watermelon with salt.