science

Does Magnesium Help With Leg Cramps? A Scientific Explanation

On This Page

    The effect of magnesium on treating leg cramps has yet to be established through clinical trials. But there are other options that can go a long way.

    Does magnesium help with leg cramps?

    Magnesium on its own has not been shown to help with leg cramps, according to clinical research. However, studies have shown that it plays a major role in both muscle and bone health, and scientists have found many associations and overlap between people who may have leg cramps and those who consume less or have lower levels of magnesium.

    Here’s what we know:

    • 48% of adults get less magnesium than the recommended intake.
    • 50-60% of the magnesium in the body is in the bones, while the rest is in muscles and soft tissue.
    • Research that looked at the effects of magnesium supplements in pregnant people—who may more commonly experience leg cramps—showed no changes in leg cramps between the treatment or placebo groups.
    • A study of 175 people who experienced night-time leg cramps showed that by the end of the 60-day study period, those who took magnesium supplements had better sleep quality and more night-time leg comfort than the placebo group. But another study that evaluated magnesium supplements in 88 adults for four weeks showed no difference on nocturnal leg cramps compared to placebo.

    It’s possible that magnesium supplement benefits only show up after taking it for longer periods, such as 60 days compared to only 4 weeks, but larger, randomized trials need to be done to understand why some studies show benefits for leg cramps and some do not.

    How much magnesium should I take for leg cramps?

    There is no recommended amount of magnesium for leg cramps, since it’s not definitely known to help. But a goal to consume adequate amounts of magnesium is important for overall well-being.

    The Recommended Dietary Allowance (RDA) for magnesium varies based on certain factors:

    • Adults born male, ages 19-30: 400 mg
    • Adults born male, ages 31+: 420 mg
    • Adults born female, ages 19-30: 310 mg
    • Adults born female, ages 31+: 320 mg
    • Pregnancy: 350 mg (ages 19-30), 360 mg (ages 31+)
    • Lactation: Same as the RDA for adults in the appropriate age group

    The tolerable upper intake level (UL) for magnesium that comes from supplement sources is 350 mg for adults of all ages.

    What causes leg cramps?

    Leg cramps are a common complaint of many people. They can happen at almost any age, for different reasons. Sometimes the cause is not known. Some people may be more likely to experience them than others.

    Some common triggers of leg cramps include:

    • Dehydration or electrolyte imbalances
    • Muscle strain or overuse
    • Nerve compression
    • Staying in one position for too long
    • Exercising without stretching
    • Higher physical activity, especially intensive
    • Injury
    • Pregnancy
    • Aging
    • Certain health conditions
    • Side effects of some medicines

    If you are experiencing leg cramps consider talking to your doctor in order to address the underlying cause or contributing factors.

    What are the best sources of magnesium?

    Magnesium can be found in many foods. Eating a diet that is rich in magnesium and other essential nutrients is the best way to support overall health. Foods that contain higher amounts of magnesium include:

    • Pumpkin seeds
    • Chia seeds
    • Almonds
    • Spinach
    • Cashews
    • Peanuts
    • Shredded wheat cereal
    • Soymilk
    • Black beans

    Many other foods contain smaller amounts of magnesium, including edamame, baked potatoes, brown rice, yogurt, oatmeal, other breakfast cereals, kidney beans, banana, and salmon.

    Around 30-40% of the magnesium that you eat from food is absorbed. If you do not eat enough dietary magnesium, supplements can help to fill in nutritional gaps. Magnesium is often included in multivitamins and prenatal supplements. The Care/of Prenatal Vitamin includes 100 mg of magnesium hydroxide sourced from sea water, while the Care/of Multivitamin contains 90 mg. The Care/of Magnesium supplement provides 200 mg.

    What type of magnesium is best to take for leg cramps?

    Because magnesium is not directly known to address leg cramps, there is no specific form that is recommended.

    There are many forms of magnesium supplements available. Some common types of magnesium include:

    • Magnesium citrate
    • Magnesium hydroxide
    • Magnesium chloride
    • Magnesium oxide
    • Magnesium malate
    • Magnesium l-threonate
    • Magnesium lactate
    • Magnesium taurate
    • Magnesium sulfate
    • Magnesium glycinate
    • Magnesium orotate

    Magnesium hydroxide is the form used in Care/of supplements. Research has noted that this is a clinically relevant form with no severe side effects noted. Magnesium citrate is also commonly used.

    Exploring the relationship between magnesium and other nutrients

    Magnesium works with other nutrients in the body to support essential functions and overall health.

    Magnesium and calcium

    Calcium is widely known to be a major component of bones and teeth. Magnesium is also found in the bones. A deficiency in any bone-related nutrient affects overall health—for example, a diet that contains plenty of calcium but little magnesium could still result in overall challenges with bone strength. Magnesium is also needed to help transport calcium ions across cell membranes, which supports healthy nerve impulses and muscle function.

    You need calcium and magnesium to be balanced, which generally means about a 2-to-1 ratio. When your diet is low in calcium and you eat more magnesium, or take magnesium supplements, the effect can further reduce how much calcium is absorbed from the foods that you do eat.

    Magnesium and potassium

    Both magnesium and potassium are needed for health, especially as electrolytes that help to regulate fluid balance inside and outside of cells. Electrolyte nutrients are also important for healthy muscle function, including the heart.

    Magnesium and potassium are needed in balanced amounts. One can’t replace the other. Beyond that, low levels of one can also negatively affect the other. For example, not consuming enough magnesium increases how much potassium is lost from the body in the urine. Magnesium is also needed to help potassium ions cross cell membranes—this supports healthy muscle contraction, including a normal heart rhythm.

    Other ways to avoid leg cramps

    You can find relief from leg cramps with these proven strategies.

    Stretches for leg cramps

    The first thing to do if your leg is cramping is to stretch it in an appropriate way. Always do this gently, since sudden movements may worsen muscle discomfort.

    Try one of these:

    • Gently pull your toes toward your head, holding steady until the cramping eases. If this movement severely worsens pain, stop immediately.
    • With the leg that is not cramped, perform a lunge movement. This puts the cramping leg behind you, extended and gently stretching.

    If you are prone to leg cramps, research has found that stretching more frequently may help prevent them, especially if you do it before bed. If stretching does not ease your muscle cramping, see a medical provider.

    Massage for leg cramps

    Massage can help to ease tense muscles, which may help alleviate muscle cramps. You can use your hands to massage the cramped area or consider a foam roller to help relax your leg muscles.

    Hydration for leg cramps

    Sometimes leg cramps happen because your body is low on fluids. Dehydration is a common cause. While there’s no universally accepted amount of fluid that everyone has to consume for optimal hydration, if you aren’t consuming between 6-8 glasses of fluids per day, that may be a good place to start. You can also boost your hydration with electrolytes added to your water.

    Magnesium for muscle function

    Magnesium may not directly address leg cramps, but it is necessary for healthy muscles. It’s needed to help muscles all through the body, including the heart, contract and relax in normal ways. Magnesium also plays a role in muscle fitness, primarily in people who are low in magnesium, like older adults, those experiencing stress, or people who consume alcohol regularly. In college-aged adults, magnesium helped with muscle soreness, perception of exertion, and recovery after strength training.

    Magnesium for bone health

    Bone health relies on much more than calcium alone. Magnesium is needed to help with calcium transport, and bones also contain magnesium. Adequate magnesium intake is needed to support strong bones and healthy bone density. This is because magnesium plays an important role in stimulating osteoblasts for normal bone formation. Magnesium deficiency interferes with the release of parathyroid hormone, which is a vital regulator of calcium balance within the body.

    The bottom line

    Some people feel strongly that magnesium supplements help their leg cramps. While scientific evidence from clinical trials has not proven this link, magnesium is essential for healthy muscles and bones. Inadequate intake from diet is common on American adults, and low levels can have a major impact on overall skeletal, muscular, and cellular health. When you’re dealing with leg cramps, stretching or massage are the best things to help in the moment. To support overall muscle health, focus on eating plenty of magnesium-rich foods, and ask your healthcare provider if a dietary supplement would be helpful.

    You're unique. Your supplements should be too.

    Take the quiz
    Dr. Carla Montrond Correia ND, CNS
    Medical Content Manager
    Dr. Montrond-Correia is a licensed naturopathic physician and a certified nutrition specialist (CNS). She holds degrees from University of Bridgeport, Georgetown University, and University of Saint Joseph, and supplemented her education with internships in the health and wellness space. She's focused on research, herbal medicine, nutrigenomics, and integrative and functional medicine. She makes time for exercise, artistic activities, and enjoying delicious food.
    Mia McNew, MS
    Freelance Contributor
    Mia McNew is a nutrition science researcher with bachelor's and master's degrees in nutrition science and biochemistry. She holds additional certifications in clinical nutrition and formerly managed a private nutrition practice focusing on fertility and the management of chronic health and autoimmune disorders. She is currently pursuing a PhD in human nutrition with a research focus on disability, underserved populations, and inequities in popular nutrition therapy approaches. She has extensive experience as a fact-checker, researcher, and critical research analyst and is passionate about science and health communications that provide practical support.