Magnesium is good for leg cramps; women take it to relieve leg cramps during pregnancy, and patients take it to relieve restless leg syndrome, states WebMD. A diet with insufficient magnesium can cause leg cramps, states Mayo Clinic. Magnesium is necessary for proper muscle and nerve function and bone growth.
High blood pressure medications can diminish the level of magnesium in the body, according to Mayo Clinic. Magnesium deficiency commonly occurs in the United States, especially among African Americans, women and the elderly, notes WebMD. High fiber foods, such as broccoli, almonds, beans and whole grains are typically high in magnesium. Other sources include meats, chocolate, dairy products and coffee.