Potassium is an electrolyte mineral that supports proper functioning of your muscles. A potassium deficiency, called hypokalemia, can cause a range of symptoms including muscle weakness, spasms and cramping. Speak to your doctor about your leg cramps before taking a potassium supplement -- the cramps could be caused by something else, and taking a potassium supplement if you don't need to might cause side effects.
To prevent a potassium deficiency and symptoms such as muscle cramps, you should aim to meet the recommended daily intake for the mineral each day. That amount is set at 4.7 grams each day for all adults.
People who are very active may require more potassium than those who are sedentary or only moderately active. According to the Colorado State University website, athletes who exercise for periods longer than an hour may need to eat more potassium-rich foods.
Excessive fluid loss is the main reason for potassium deficiency. This includes loss of fluids from sweating during long periods of exercise; the use of diuretics; and diarrhea and vomiting caused by illness, excessive laxative use or an eating disorder like bulimia. Antibiotics, chronic kidney disease and a low level of the mineral magnesium can also cause hypokalemia. A low magnesium level can also cause muscle cramps and spasms.
Fruits, vegetables, meats, seafood, dairy products and nuts are all good sources of potassium. The best sources include white beans, with 1,004 milligrams per cooked cup; spinach, with 839 milligrams per cooked cup; baked potatoes, with 926 milligrams per average-size potato; dried apricots, with 755 milligrams per 1/2 cup; and baked acorn squash, with 899 milligrams per cup cubed.
Depending on the severity of your potassium deficiency, your doctor may recommend potassium supplements. You should never take a potassium supplement without your doctor's permission. Too much potassium can have side effects including upset stomach, vomiting and diarrhea. More serious side effects include mental confusion; listlessness; tingling, prickling, burning sensations in extremities; heavy or weak legs; cold, pale, gray skin; stomach pain and unusual bulging; and black stools.