Skip to main content

Does magnesium help with headaches and migraines?

Medically reviewed by Kristianne Hannemann, PharmD. Last updated on March 28, 2025.

Official Answer by Drugs.com

Yes, magnesium can help with headaches and migraines. Current scientific evidence suggests a significant relationship between magnesium levels and headache disorders, particularly migraines. Research indicates that magnesium supplementation may serve as an effective preventive treatment for migraines and potentially provide relief during acute attacks.

What is Magnesium?

Magnesium is the fourth most abundant cation in the human body and plays crucial roles in numerous physiological functions, including enzyme activity, neuromuscular excitability, and cell signaling pathways. Its deficiency can occur due to inadequate dietary intake or increased losses through gastrointestinal or renal pathways, potentially contributing to headache vulnerability.

How Does Magnesium Help with Headaches?

People who experience migraines tend to have lower serum magnesium levels compared to those who don't suffer from headaches. Magnesium influences several neurological and vascular mechanisms implicated in headaches:

Clinical Evidence: Efficacy of Magnesium in Headache Treatment

Prevention of Migraine

Multiple randomized, double-blind, placebo-controlled trials have evaluated magnesium supplementation for migraine prevention:

Treatment of Migraine

Intravenous magnesium has been investigated for treating acute migraine attacks:

How Much Magnesium Should You Take?

Always consult with your healthcare provider before starting a magnesium supplement. It is possible to take too much, which can lead to side effects.

When used for migraine prevention, the American Headache Society recommends a dose of 400 mg to 500 mg a day of magnesium oxide. Magnesium is available in many forms, and your healthcare provider might recommend a different form or dose of magnesium.

For migraine treatment, 1 gram of magnesium sulfate has been given intravenously. Your healthcare provider can help you determine the best treatment options for your migraine attacks.

Where to Get Magnesium?

While supplementation may be necessary to achieve therapeutic doses, many foods provide significant magnesium:

Regular consumption of magnesium-rich foods may help maintain adequate levels, though supplements are typically needed to achieve the doses used in clinical studies for headache prevention.

What Are The Side Effects of Magnesium?

Magnesium supplementation is generally considered safe, but can cause mild side effects:

Magnesium supplements may interact with medications for bone health, infections, and high blood pressure. Share a list of your medications with your healthcare provider before starting a magnesium supplement so they can check for potential interactions.

Summary

The current evidence supports a role for magnesium in both the prevention and treatment of headache disorders, particularly migraines. Multiple clinical trials and meta-analyses demonstrate that magnesium supplementation can reduce the frequency and intensity of migraine attacks, while intravenous magnesium shows promise for acute treatment.

The American Academy of Neurology, American Headache Society, and other international guidelines now include recommendations for magnesium in headache management. With its relatively benign side effect profile, magnesium represents an attractive option for many patients, especially those who prefer non-pharmaceutical approaches or who belong to sensitive populations such as children, pregnant women, and the elderly.

Read this next: Magnesium 101: Benefits, types, foods & dosage guide

References
  1. American Headache Society. 2021. Incorporating Nutraceuticals for Migraine Prevention. Accessed March 28, 2025 at https://americanheadachesociety.org/news/incorporating-nutraceuticals-for-migraine-prevention
  2. Chiu, H. Y., et. al. 2016. Effects of Intravenous and Oral Magnesium on Reducing Migraine: A Meta-analysis ofRandomized Controlled Trials. In: Pain Physician. PMID: 26752497
  3. Domitrz, I., et. al. 2022. Magnesium as an Important Factor in the Pathogenesis and Treatment of Migraine-From Theory to Practice. In: Nutrients. DOI: https://doi.org/10.3390/nu14051089
  4. Facchinetti F, et. al. 1991. Magnesium prophylaxis of menstrual migraine: effects on intracellular magnesium. In: Headache. DOI: https://doi.org/10.1111/j.1526-4610.1991.hed3105298.x
  5. Maier J. A., et. al. 2020. Headaches and Magnesium: Mechanisms, Bioavailability, Therapeutic Efficacy and Potential Advantage of Magnesium Pidolate. In: Nutrients. DOI: https://doi.org/10.3390/nu12092660
  6. Root, A. W. 2021. Disorders of Mineral Metabolism: Normal Homeostasis. In: Sperling Pediatric Endocrinology (Fifth Edition). DOI: https://doi.org/10.1016/B978-0-323-62520-3.00009-9
  7. von Luckner, A., et. al. 2017. Magnesium in Migraine Prophylaxis—Is There an Evidence-Based Rationale? A Systematic Review. In: Headache: The Journal of Head and Face Pain. DOI: https://doi.org/10.1111/head.13217

See also:

Related medical questions

Related support groups