Magnesium, Potassium & Leg Cramps

According to the American Academy of Orthopedic Surgeons, the most common location for a muscle cramp is in the calf, hamstring or quadriceps muscles. Muscle cramps are spontaneous pangs of intense pain that can often catch you off guard. Leg cramps can happen in the middle of the night or during exercise. Almost everyone, at some time, will experience a muscle cramp.

Strenuous exercise can cause leg cramps.
Credit: Karl Rosencrants/iStock/Getty Images


Potassium and magnesium are both considered key minerals that your body needs. These minerals are known as electrolytes and influence the volume of water in your body and your pH levels. Sweating causes your body to lose these valuable electrolytes, which may negatively affect your body and lead to painful muscle cramps.


A common cause of leg cramps is a deficiency in some kind of electrolytic mineral, oftentimes potassium or magnesium. Either your diet is not rich enough in these minerals for physical activity or the physical activity itself is the cause. A combination of increasing body temperature, sweat and dehydration can cause you to become depleted of electrolytes during exercise. To avoid dehydration, increase you water intake before, during and after exercise. If your diet is lacking in these essential nutrients you can increase your consumption of potassium-rich foods like milk, potatoes, fish, bananas, lima beans and melon. Good sources of magnesium include soy, yogurt, spinach, black beans and avocado. Recommendations for dietary potassium are to take in 4,700 mg per day. For magnesium adult women need 310 to 320 mg and adult men should get 400 to 420 mg. However, before changing your diet or increasing your consumption of a certain mineral, check with your doctor to be sure the change is safe for your body.


A regular stretching routine can help you avoid cramping. To stretch the hamstring muscles sit on the floor with your legs extended. Slowly lean your chest forward while keeping your knees straight. To stretch the calf muscles stand in a lunging position, placing one leg forward with the knee bent and the other leg straightened behind you. Lean forward while keeping your back heel on the ground to feel a stretch in your calf. For the quadriceps muscles, bring one heel up toward your glutes by lifting your foot and bending your knee. Use a chair or wall to help keep your balance. Be sure to hold these stretches for at least 20 to 30 seconds. These can be done before and after exercise.

The simplest way to relieve a muscle cramp may be to just walk it off. You can also try shaking your leg and massaging the cramping muscle. You may also want to consider applying heat or taking a warm bath.


Most leg cramps are harmless, states the American Academy of Orthopedic Surgeons. However, under certain circumstances your leg cramps may be a sign of something more serious. If you are not doing any sort of physical activity and get leg cramps often that do not respond to stretching or massage, you may have nerve or circulation problems. Consult your doctor for help with managing your leg cramps.

references & resources
Load Comments

Copyright © 2019 Leaf Group Ltd. Use of this web site constitutes acceptance of the LIVESTRONG.COM Terms of Use , Privacy Policy and Copyright Policy . The material appearing on LIVESTRONG.COM is for educational use only. It should not be used as a substitute for professional medical advice, diagnosis or treatment. LIVESTRONG is a registered trademark of the LIVESTRONG Foundation. The LIVESTRONG Foundation and LIVESTRONG.COM do not endorse any of the products or services that are advertised on the web site. Moreover, we do not select every advertiser or advertisement that appears on the web site-many of the advertisements are served by third party advertising companies.