Cause 4: Low levels of key minerals. Magnesium, potassium, and calcium all help muscles contract and relax. If you are not getting enough through food, or you are losing them through sweat, diarrhea, or certain medications, cramps may become more likely. Foods rich in these minerals include leafy greens, bananas, avocados, beans, nuts, seeds, yogurt, and whole grains. Magnesium supplements are popular, but research on whether they prevent cramps is mixed, and too much can cause side effects. Talk to a doctor or pharmacist before starting one, especially if you have kidney problems.









