HINREVERSE ENTROPY JOURNAL
← Reverse Entropy Journal

Nighttime Leg Cramps: Should You Take Magnesium?

By Choi Kyeong Rok, MD, PhD · 2026-12-04

Tap or click a figure to view the full-size image in a new tab.

When your calf suddenly becomes rock-hard at night, the first question is whether to pull your foot toward you or point your toes. Once it finally relaxes, another question comes to mind: should I buy a bottle of magnesium?

My conclusion is that I would not recommend magnesium solely because someone has nighttime leg cramps. Its benefit is less convincing than many expect, and other causes may be involved.

Does the calf become hard and tight?

A typical nocturnal leg cramp is a sudden, painful muscle contraction, usually in the calf but sometimes in the foot or thigh. It normally lasts seconds to minutes and may leave soreness afterward. In contrast, an uncomfortable urge to move the legs that temporarily improves with movement is more characteristic of restless legs syndrome. Both disturb sleep, but their causes and management differ.

Illustration of a man experiencing a painful calf cramp at night
Think about whether the muscle became hard or you mainly felt an urge to move. Reverse Entropy · illustrative image.

What do the magnesium studies show?

A 2017 randomized trial in JAMA Internal Medicine assigned 94 adults with nocturnal leg cramps to magnesium or placebo for four weeks. In the magnesium group, cramps fell from 7.84 to 4.44 per week. That looks impressive on its own, but in the placebo group they also fell from 8.51 to 5.48. The mean reductions were 3.41 and 3.03 respectively: an additional 0.38 cramps per week, not statistically significant. Pain and sleep outcomes did not differ clearly either. [3]

Four-week randomized trial · Roguin Maor et al., 2017
GroupMean reduction in cramps per week
Magnesium3.41
Placebo3.03
Additional reduction0.38 (p = 0.67)

Imagine buying a supplement after a particularly bad week. If you wake less often the following week, it is natural to credit the supplement. But cramps fluctuate from week to week even without treatment.

One study found a benefit after two months

A multicenter Ukrainian trial in 2021 randomized 184 people to magnesium oxide monohydrate or placebo for 60 days; 173 were included in the efficacy analysis. Weekly cramps fell by about 3.4 versus 2.6, an additional reduction of around 0.8 per week. Duration and sleep measures improved, but pain severity did not differ between groups. [4]

In February 2026, another randomized trial of 121 people aged 50–85 with recurring cramps found no clear additional benefit from four weeks of magnesium. Taken together, these findings are not convincing enough for me to routinely recommend magnesium for nocturnal cramps. [5]

What to do when a calf cramps

Gently move the calf muscle in the direction that lengthens it.

  1. Sit on the bed or find a stable position.
  2. Slowly straighten your knee.
  3. Pull your toes toward your shin, bending the ankle upward.
  4. Hold gently without bouncing; massage the calf lightly if needed.
Seated man gently drawing his toes toward his shin with the knee extended
Slowly straighten the knee and draw the toes toward the shin. Do not force the ankle. Reverse Entropy · illustrative image.

Do not confuse this movement with pointing the toes away. If you cannot reach your foot easily, move the ankle gradually within your comfortable range rather than forcing your body to bend. Some soreness may remain for a day, but worsening pain or swelling warrants assessment. [8]

What should you try first?

I suggest gentle calf and hamstring stretching before bed. In a 2012 trial of 80 adults older than 55, six weeks of pre-bed stretches reduced cramp frequency and pain compared with no specific stretching. [6]

Wall-supported calf stretch and seated hamstring stretch
Left: keep the rear knee straight and heel on the floor while gently bending the front knee. Right: straighten one knee and lean slightly from the hips. Reverse Entropy · illustrative home stretches, not reproductions of the study figures.

In the 2012 study, stretches were held for 10 seconds with 10 seconds of rest, repeated three times. Regular, comfortable stretching is preferable to pulling hard. Consider whether you exercised more than usual, lost fluid through sweating or diarrhea, or recently began or changed a medicine. A short diary recording the cramps, awakenings, exercise and medicine changes may help.

Who should have magnesium assessed?

When deficiency is suspected, the situation is different. Poor dietary intake, prolonged diarrhea, malabsorption, or medicines that increase magnesium loss may require evaluation and supplementation. If considering a supplement, check kidney function and other medicines. Magnesium can cause diarrhea and abdominal discomfort, interfere with absorption of some antibiotics and osteoporosis medicines, and accumulate when kidney function is reduced. Include magnesium in antacids and laxatives when reviewing intake. [1]

Medical compression stockings also showed a benefit

The 2026 trial also included a medical compression stocking group. After four weeks, the adjusted cramp frequency was 1.43 fewer per week than placebo; awakenings and pain also improved. Participants wore the stockings after getting up and removed them at bedtime. Some discontinued the stockings because of adverse reactions. [5]

For recurring cramps with leg swelling, compression may be worth discussing after the cause of swelling and suitability of stockings have been assessed. The trial excluded people with suspected peripheral arterial disease and several other conditions, so it does not support self-treatment of unexplained swelling.

When to seek medical assessment

Get assessed if cramps frequently interrupt sleep, last more than ten minutes, or occur with numbness or weakness. Persistent pain and swelling in one leg, or a change in skin color, warrants same-day medical assessment. If sudden breathlessness or chest pain occurs as well, call your local emergency services. [8,10]

My conclusion

Before taking more magnesium, work out what kind of cramp you are experiencing. For the classic hard, painful calf contraction, learn the direction that relaxes it and try gentle stretching before bedtime. If cramps recur, review changes in exercise, fluid loss, medicines and accompanying symptoms. Supplement when a magnesium deficiency is suspected or confirmed and appropriately assessed.

References

  1. NIH Office of Dietary Supplements: Magnesium — Health Professional Fact Sheet
  2. MSD Manual Professional: Muscle Cramps
  3. Roguin Maor N et al. JAMA Internal Medicine. 2017.
  4. Barna O et al. Nutrition Journal. 2021.
  5. Kuusipalo A et al. Trials. 2026.
  6. Hallegraeff JM et al. Journal of Physiotherapy. 2012;58:17–22.
  7. Coppin RJ et al. British Journal of General Practice. 2005;55:186–191.
  8. NHS: Leg cramps
  9. NHS: Restless legs syndrome
  10. NHS: Deep vein thrombosis

Originally published in Korean on 2026-12-03. Read the Korean original ↗