Skip to main content

Does magnesium help with headaches and migraines?

Medically reviewed by Kristianne Hannemann, PharmD. Last updated on Sep 5, 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:

Types of Magnesium Supplements for Headaches and Migraines

There are several forms of magnesium supplements available, each with different absorption rates and potential side effects. Choosing the right type can make a difference in both effectiveness and tolerability, especially for people managing headaches or migraines. Here are the most common types:

Magnesium Oxide

Magnesium Citrate

Magnesium Glycinate

Magnesium Malate

Magnesium Chloride

Magnesium Sulfate

Magnesium L-Threonate

Choosing the Right Type

No single form of magnesium is best for everyone. Factors like absorption, side effects, and personal health needs should guide your choice. It may take some trial and error to find the supplement that works best for you. Consulting with a healthcare provider can help ensure you select the most appropriate type and dosage for your situation

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 magnesium for headaches. 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.

Dietary Magnesium—Beyond Supplements

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:

These gastrointestinal effects are typically dose-dependent and vary based on the magnesium formulation used.

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
  8. Zhang, C., Hu, Q., Li, S., Dai, F., Qian, W., Hewlings, S., Yan, T., & Wang, Y. (2022). A Magtein®, Magnesium L-Threonate, -Based Formula Improves Brain Cognitive Functions in Healthy Chinese Adults. Nutrients, 14(24), 5235. https://doi.org/10.3390/nu14245235

Read next

When is the best time to take magnesium, morning or night?

The best time of day to take magnesium depends on your health goals and individual needs. While timing can enhance specific benefits, maintaining a consistent routine is more important for stable magnesium levels in the body. Many studies show the full benefits of magnesium occur after long-term use.

Continue reading

How long does magnesium citrate take to work?

According to the information provided with magnesium citrate liquid products, you can generally expect it to cause a bowel movement anywhere from 30 minutes to 6 hours after you drink it.

Continue reading

Should I take magnesium with or without food?

It is generally recommended to take magnesium with food to help lower the chances for an upset stomach and increase the absorption of the mineral into your body. If you take magnesium on an empty stomach, you increase the risk for common stomach side effects like diarrhea, nausea and abdominal cramping.

Continue reading

See also:

Related medical questions

Related support groups