What is the role of magnesium in treating muscle spasms?

Medical Advisory BoardAll articles are reviewed for accuracy by our Medical Advisory Board
Educational purpose only • Exercise caution as content is pending human review
Article Review Status
Submitted
Under Review
Approved

Last updated: November 15, 2025View editorial policy

Personalize

Help us tailor your experience

Which best describes you? Your choice helps us use language that's most understandable for you.

Magnesium for Muscle Spasms

Magnesium has limited to no benefit for common skeletal muscle cramps (such as nocturnal leg cramps in older adults), but it has specific, well-established roles in treating cardiac arrhythmias, tetanus-related spasms, and shivering after cardiac arrest. 1

Evidence-Based Applications

Where Magnesium IS Effective

Cardiac Arrhythmias (Ventricular Fibrillation/Tachycardia)

  • Magnesium is recommended for VF/VT, particularly when associated with acute myocardial infarction, at a dose of 8 mmol bolus injection followed by 2.5 mmol/h infusion. 2
  • For torsades de pointes with suspected hypomagnesemia, magnesium 8 mmol IV is recommended. 3
  • In cardiac arrest with hypomagnesemia, 1-2 g IV magnesium sulfate bolus is indicated. 4

Tetanus-Related Muscle Spasms

  • Magnesium sulfate is effective for controlling muscle spasms and rigidity in mild-to-moderate tetanus. 5
  • Dosing: 100 mg/kg IV loading dose followed by continuous infusion at 40 mg/kg/hr, titrated upward by 5 mg/kg/hr every 6 hours until spasm control or loss of patellar reflex. 5
  • In severe tetanus, magnesium significantly reduces the need for midazolam (p=0.026) and pipecuronium (p=0.005) to control spasms, though it does not reduce mechanical ventilation requirements. 6
  • Magnesium can avoid the need for deep sedation and mechanical ventilation in moderate cases. 7

Post-Cardiac Arrest Shivering

  • Magnesium sulfate infusions provide modest adjunctive benefit for shivering suppression during targeted temperature management, though effects are slight and typically insufficient when used alone. 2
  • Should be combined with other non-sedating adjuncts like acetaminophen due to limited efficacy as monotherapy. 2
  • Safe with serum levels maintained below 4 mg/dL. 2

Where Magnesium IS NOT Effective

Idiopathic Skeletal Muscle Cramps (Nocturnal Leg Cramps)

  • For older adults with idiopathic rest cramps, magnesium provides no clinically meaningful benefit compared to placebo. 1
  • At 4 weeks, the percentage change in cramp frequency showed no significant difference (MD -9.59%, 95% CI -23.14% to 3.97%). 1
  • No difference in cramp intensity (RR 1.33 for moderate/severe cramps, 95% CI 0.81 to 2.21). 1
  • No difference in cramp duration (RR 1.83 for cramps ≥1 minute, 95% CI 0.74 to 4.53). 1
  • This represents moderate-to-high certainty evidence against routine use. 1

Pregnancy-Associated Leg Cramps

  • Evidence is conflicting and inconclusive—some studies show benefit while others show none. 1
  • Cannot make a firm recommendation for or against use in this population. 1

Cerebral Vasospasm After Subarachnoid Hemorrhage

  • Magnesium sulfate does NOT improve clinical outcomes in aneurysmal subarachnoid hemorrhage despite early promising data. 2
  • The phase 3 IMASH trial showed no clinical benefit from magnesium infusion over placebo. 2
  • While pilot trials suggested reduction in delayed ischemic deficits, meta-analysis did not confirm benefit. 2

Erythromelalgia

  • Oral magnesium (600-6500 mg daily) showed improvement in 8 of 13 patients in one survey, but evidence is extremely limited. 2
  • IV magnesium 2 g every 2-3 weeks has minimal supporting data. 2

Muscle Cramps in Liver Cirrhosis

  • Hypomagnesemia correction may help, but specific evidence for magnesium supplementation in cirrhosis-related cramps is limited to one small inconclusive study. 2, 1
  • Baclofen (10-30 mg/day) and albumin (20-40 g/week) are preferred for muscle cramps in cirrhosis. 2

Safety Profile

Adverse Events

  • Minor adverse events occur more frequently with magnesium than placebo (RR 1.51,95% CI 0.98 to 2.33), primarily gastrointestinal (diarrhea in 11-37% vs 10-14% in controls). 1
  • Major adverse events and withdrawals due to adverse effects are not significantly different from placebo. 1
  • Asymptomatic hypocalcemia is common with magnesium therapy and requires calcium supplementation. 5

Monitoring Requirements

  • When using continuous magnesium infusions for tetanus or other spastic conditions, monitor cardiovascular and respiratory function, deep tendon reflexes, and serum magnesium concentrations closely. 7
  • Have calcium chloride 10% (5-10 mL) or calcium gluconate 10% (15-30 mL) available to reverse potential magnesium toxicity. 4
  • Target serum magnesium above 1.3 mEq/L (normal range 1.3-2.2 mEq/L). 4

Clinical Algorithm

For common muscle cramps (nocturnal leg cramps in older adults):

  • Do NOT use magnesium as it provides no meaningful benefit. 1
  • Consider alternative therapies based on underlying etiology.

For cardiac arrhythmias (VF/VT, torsades):

  • Use magnesium 8 mmol IV bolus followed by 2.5 mmol/h infusion. 2

For tetanus-related spasms:

  • Start magnesium 100 mg/kg IV load, then 40 mg/kg/hr infusion, titrating upward every 6 hours. 5
  • Expect efficacy in mild-moderate cases; severe cases will likely require additional sedation. 5

For post-cardiac arrest shivering:

  • Use magnesium as adjunct only, combined with acetaminophen and other measures. 2

References

Research

Magnesium for skeletal muscle cramps.

The Cochrane database of systematic reviews, 2020

Guideline

Guideline Directed Topic Overview

Dr.Oracle Medical Advisory Board & Editors, 2025

Guideline

Treatment for Ventricular Tachycardia Storm

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Guideline

Treatment of Magnesium Wasting

Praxis Medical Insights: Practical Summaries of Clinical Guidelines, 2025

Research

Magnesium sulfate for control of muscle rigidity and spasms and avoidance of mechanical ventilation in pediatric tetanus.

Pediatric critical care medicine : a journal of the Society of Critical Care Medicine and the World Federation of Pediatric Intensive and Critical Care Societies, 2003

Professional Medical Disclaimer

This information is intended for healthcare professionals. Any medical decision-making should rely on clinical judgment and independently verified information. The content provided herein does not replace professional discretion and should be considered supplementary to established clinical guidelines. Healthcare providers should verify all information against primary literature and current practice standards before application in patient care. Dr.Oracle assumes no liability for clinical decisions based on this content.

Have a follow-up question?

Our Medical A.I. is used by practicing medical doctors at top research institutions around the world. Ask any follow up question and get world-class guideline-backed answers instantly.