Skip to content

Muscle cramps and magnesium

Dr. Ladd Carlston · Overland Park, KS · Updated October 13, 2026

A calf that seizes in the night, a foot that locks when you stand, a cramp in the middle of a workout. People ask me about magnesium for all three. Here is the short version, then the detail: for typical night leg cramps in older adults, a large review found magnesium is unlikely to help. In pregnancy the evidence is mixed. A supplement is not something to start without your own doctor.

Who gets them

Night cramps in the calf are the ones people describe most. Cramps in the foot and the thigh are common too, and so are cramps during or right after exercise. A review in American Family Physician reported nocturnal leg cramps in 50 to 60 percent of adults. Pregnancy and older age are the two settings where rest cramps show up most often. Hard exercise is another. Some people cramp as part of another medical condition, including circulation problems, nerve problems, and dialysis.

What’s actually known about why

Ordinary muscle cramps are not fully understood. Most night cramps have no disease behind them. The clinical word is idiopathic, which means the cause has not been identified.

The leading ideas are muscle fatigue and a nerve that fires when it should stay quiet. The American Family Physician review describes electromyography research in which leg cramps show up as an uncontrolled burst of nerve firing. That is the best current account, and it is still not a complete explanation. The same review is plain about the popular explanation: neither night cramps nor exercise cramps have been tied to dehydration, or to low potassium, sodium, or magnesium. A severe mineral imbalance can cause cramps. That is a medical problem a physician sorts out. It is not the usual story behind a calf that grabs at 2 a.m.

Cramps during exercise got a fresh look in 2026. A systematic review in Muscle & Nerve pulled together nine studies that followed about 11,000 athletes over time. Of everything the researchers tested, one predictor stood out: athletes who had cramped before were about 4.4 times as likely to cramp again. Age, body weight, and height showed no link. Hydration, training, and routine showed no consistent link either. The authors’ reading is that exercise cramps tend to recur in the same people, and that the usual prevention advice built on fluids and training load is on shakier ground than most of us were taught. They also said much of the evidence is still limited. If you cramp in the same spot every time you run or play, I take that as a pattern to test, not bad luck.

A few associations are real. Pregnancy is one, though it is hard to separate pregnancy itself from the vein changes that come with it. Medicines are another, and the evidence is uneven. A 2012 study of prescription records in British Columbia found that treatment for night cramps was more likely in the year after people started a potassium-sparing diuretic, a thiazide-like diuretic, or an inhaled long-acting beta agonist. The link was smaller for loop diuretics and for statins. The American Family Physician review, published the same year, noted that this kind of study can be muddied by worsening illness and by people simply seeing the doctor more, and that a common diuretic such as hydrochlorothiazide has not been shown to cause the cramps. If yours started after a new prescription, tell the doctor who wrote it. Do not stop a prescribed medicine because of something you read here.

What magnesium does, and what it does not

Magnesium is sold for cramps. The trials do not support that for the night cramps most older adults get.

In 2020, Cochrane published a review of the randomized trials. For idiopathic cramps, mostly in older adults and mostly at night, magnesium was unlikely to reduce how often the cramps came or how severe they were. The reviewers called that moderate-certainty evidence. In pregnancy, the trials did not agree with each other, the studies had important limits, and the reviewers were very uncertain whether magnesium helps. They found no randomized trials of magnesium for cramps that come with exercise, and only one small, inconclusive study in people with liver disease.

An older clinical review was more hopeful about magnesium as a treatment. The Cochrane review is the one that pooled the trials, and it is the one I go by.

Severe magnesium deficiency is a different condition. The National Institutes of Health notes that as deficiency gets worse, people can develop numbness, muscle contractions and cramps, seizures, and abnormal heart rhythms. Symptomatic deficiency from diet alone is uncommon in otherwise healthy people. A routine blood test is also an imperfect check, because almost all of the body’s magnesium sits in bone and inside cells, not in the serum. If you and your doctor think you are actually deficient, that decision belongs with them.

The bottom line, as plainly as I can put it: if you are an older adult with ordinary night cramps, the best evidence says a magnesium supplement probably won’t change how often they come or how bad they are. If you are pregnant, nobody knows yet, and that call belongs with your doctor. If your cramps come with exercise, magnesium has never been properly tested for that. Stretching (below) has better evidence than any of it.

Food, side effects, and who should ask a doctor

Food is the reasonable way to get magnesium. The NIH lists green leafy vegetables such as spinach, along with legumes, nuts, seeds, and whole grains. Fortified breakfast cereals, yogurt, and milk contribute too. Magnesium from food is not the hazard. In a person with healthy kidneys, the kidneys clear what you do not need.

A supplement is a different product. High doses from supplements, and from magnesium laxatives and antacids, often cause diarrhea, nausea, and abdominal cramping. If your kidneys do not work well, clearing magnesium gets harder, and too much of it is dangerous. Do not start a magnesium supplement if you have kidney disease unless your own doctor tells you to.

Magnesium also interacts with medicines. It can block absorption of some antibiotics and of osteoporosis drugs taken by mouth, such as bisphosphonates. Some diuretics increase the magnesium lost in urine. Potassium-sparing diuretics do the opposite. Proton pump inhibitors, the acid-reducing medicines, can lower magnesium when they are taken for a long time, often more than a year. I am not going to suggest a dose. Talk with your doctor before you supplement, and bring the rest of your medicine list.

That conversation is reasonable if you are pregnant and cramping, if you take a diuretic or have been on an acid reducer for a long time, if your doctor has already said your magnesium is low, or if your meals rarely include the foods above. I would not count on a supplement to stop a typical night cramp in an older adult.

A bedtime stretch that has been tested

This is the one self-care step with a real trial behind it. In an Australian study, 80 adults over 55 with night leg cramps were randomly assigned either to stretch their calves and hamstrings every night just before bed or not to stretch. After six weeks the stretching group had fewer cramps, about one fewer per night than the other group, and the cramps they did have hurt less. Everyone finished the study.

Here is how I’d do it:

  • Calf: Face a wall with your hands on it. Step one foot back, keep that heel on the floor and the knee straight, and lean in until you feel the stretch in the calf. Hold, then switch legs.
  • Hamstring: Sit on the edge of the bed with one leg straight out and the heel on the floor. Keep your back long and hinge forward from the hips until you feel the back of the thigh. Hold, then switch.
  • Do it right before you lie down, every night, for at least six weeks before you decide whether it’s working.

A stretch should feel like a pull, not pain. If you have trouble with balance, do the calf stretch holding a counter. If stretching doesn’t change anything, or the same muscle stays tight during the day, that’s when testing the muscle makes sense.

When the cramp is a muscle problem

I do not treat low magnesium. I look at muscles that have stopped doing their job.

Here is the pattern where hands-on work is worth considering. The cramp keeps hitting the same place. The muscle stays tight after the cramp lets go. Or it started after an injury, or after that muscle had been overworking for a long time. In those cases I am often looking at a muscle and fascia problem, not a mineral problem. I test which muscles are firing and which have shut down, then work on the tissue I find. No popping or cracking. How a session actually goes is on the Muscle Reset Technique page.

A visit will not stop every cramp. Night cramps in older adults are often idiopathic, and neither a capsule nor a session has a strong claim on those. If the testing shows a muscle that has stopped firing and tissue that will not let go, that is a specific problem, and it is the one I know how to work on. Sessions are $100, cash pay, at least 30 minutes, one-on-one. I do not bill insurance.

When to see a physician instead

Some of this does not belong in my office, and it should not wait on a supplement.

Get medical care the same day if a cramp comes with swelling, redness, or warmth in the calf. The CDC lists swelling, pain, warmth, and redness or discoloration as the common signs of a blood clot in a deep vein of the leg, and says to see a doctor as soon as possible. If you also have chest pain, trouble breathing, or you cough up blood, call emergency services.

See your physician promptly, before you book with me, if:

  • the cramps started after a new medicine
  • they come with weakness or numbness
  • they are very frequent, or they are new and getting worse

Those need a medical check for a drug effect, a nerve problem, or a metabolic one. I am glad to look at the muscle once a physician has ruled out the things that are not mine to handle.

If the same spot keeps locking up

If the cramp is part of a muscle that stays tight, or a pattern that started after an injury, I can test it and tell you what I find. I see patients in Overland Park. You can book online. If any of the warning signs above apply, see a physician first.

Book a visit

Sources

  1. Garrison SR, Korownyk CS, Kolber MR, Allan GM, Musini VM, Sekhon RK, Dugré N. Magnesium for skeletal muscle cramps. Cochrane Database of Systematic Reviews. 2020, Issue 9. Art. No. CD009402. Read the Cochrane review
  2. Allen RE, Kirby KA. Nocturnal leg cramps. American Family Physician. 2012;86(4):350-355. Read the American Family Physician review
  3. Garrison SR, Dormuth CR, Morrow RL, Carney GA, Khan KM. Nocturnal leg cramps and prescription use that precedes them: a sequence symmetry analysis. Archives of Internal Medicine. 2012;172(2):120-126. Read the prescription study
  4. National Institutes of Health, Office of Dietary Supplements. Magnesium: fact sheet for health professionals. Read the NIH fact sheet
  5. Centers for Disease Control and Prevention. About venous thromboembolism (blood clots). Read the CDC page on blood clots
  6. Costa LDS, et al. Risk factors for exercise-associated muscle cramps: a systematic review with meta-analysis. Muscle & Nerve. 2026;74(5):1375-1386. https://pubmed.ncbi.nlm.nih.gov/42693659/
  7. Hallegraeff JM, et al. Stretching before sleep reduces the frequency and severity of nocturnal leg cramps in older adults: a randomised trial. Journal of Physiotherapy. 2012;58(1):17-22. https://pubmed.ncbi.nlm.nih.gov/22341378/

Medical disclaimer

The content on this page is for educational and informational purposes only. It is not medical advice, and it is not a substitute for professional medical advice or an in-person evaluation by a licensed healthcare provider. Nothing here diagnoses, treats, cures, or prevents any disease.

Do not disregard professional medical advice, or delay seeking it, because of something you read here. If you have a health concern, talk with your physician, or raise it with Dr. Ladd Carlston at an in-person visit.

Does magnesium help night leg cramps?

A 2020 Cochrane review found that magnesium is unlikely to reduce how often typical night leg cramps come, or how bad they are, in older adults. In pregnancy the trials disagree, so any benefit is uncertain. The review found no randomized trials of magnesium for cramps that come with exercise. Talk with your doctor before you take a supplement. This page does not suggest a dose.

What causes leg cramps at night?

For most people, the cause is not fully known. Clinicians call those cramps idiopathic. Muscle fatigue and a nerve that fires when it should not are the leading ideas. Dehydration and low electrolytes are often blamed, but a clinical review did not find that link for ordinary night cramps or exercise cramps. Pregnancy, older age, some medicines, and some medical conditions are real associations.

When should muscle cramps be checked by a physician right away?

The same day, if a cramp comes with swelling, redness, or warmth in the calf. Those can be signs of a blood clot. Call emergency services if you also have chest pain, trouble breathing, or you cough up blood. See your physician promptly if the cramps started after a new medicine, come with weakness or numbness, or are happening very often.

Does drinking more water prevent cramps during exercise?

A 2026 review of studies that followed about 11,000 athletes found no consistent link between hydration and exercise cramps. The strongest predictor was having cramped before. Drink to thirst for other good reasons, but don't count on water alone to stop a cramp that keeps coming back.

When might a visit help a cramp that keeps coming back?

When the same spot keeps cramping, the muscle stays tight between episodes, or the pattern started after an injury. That can be a muscle and fascia problem I can test in the office. It is not a promise that the cramps will stop, and it is not a substitute for a physician when the warning signs above are present.

Ready to find real relief?

Book online in 30 seconds. No referral needed.