14 min read
5.0
1

Magnesium for migraines: does it work, how much to take and which form

Magnesium is one of the few supplements in migraine prevention guidelines. How much to take, which form, how long it takes to work, and how it compares with riboflavin and CoQ10.

Jane Smorodnikova
Founder & CEO
Tatsiana Yashyna
Deputy COO
A woman with closed eyes presses both hands to her head as a soft orange glow, like a flame, rises from it against a dark blue background.
Explains magnesium for migraine prevention. Covers why magnesium may matter (nerve excitability, NMDA receptors, cortical spreading depression, lower levels in some people with migraine), the evidence (meta-analysis of five placebo-controlled trials: 22–43% fewer attacks; best trial 600 mg trimagnesium dicitrate for 12 weeks: 41.6% vs 15% reduction; 2012 AAN/AHS Level B; IV magnesium insufficient as a stand-alone acute treatment), typical preventive dose (400–600 mg elemental magnesium a day with food, above the 350 mg general supplement limit so agreed with a doctor; avoid in kidney failure), time to effect (two to three months), forms (citrate, oxide, glycinate, gluconate, aspartate; L-threonate impractical), menstrual migraine, and other preventive supplements (riboflavin 400 mg Level B, CoQ10 Level C, feverfew, butterbur liver risk, omega-3, probiotics). Discusses vitamin deficiencies and headaches, what to check with migraine medicines (NIH-listed interactions, levothyroxine spacing), pregnancy and teens, questions people ask next, urgent headache warning signs (MedlinePlus), and how Welltory can support a headache diary with tags, sleep and Battery, including a short migraine check-in about stress, sleep and sensitivity that does not diagnose migraine. Welltory does not diagnose or predict migraine.

Short answer

Magnesium is one of the few supplements with real support for preventing migraine. A meta-analysis of five placebo-controlled trials found 22–43% fewer migraine attacks with oral magnesium, and the 2012 American Academy of Neurology and American Headache Society guideline rated it "probably effective" (Level B) for episodic migraine prevention (1). Headache specialists typically suggest 400–600 mg of elemental magnesium a day, taken with food, for at least two to three months before judging the effect (1, 2). That is above the general 350 mg upper limit for supplements, which is why it should be agreed with a doctor, and avoided altogether in kidney failure (3).

Two other supplements have similar standing: riboflavin (vitamin B2) 400 mg a day (Level B) and coenzyme Q10 (Level C, "possibly effective") (1). Magnesium does not stop an attack that has already started; for that you need acute treatment.

If migraines are taking days out of your month, you are not exaggerating and it is not your fault. Migraine is a neurological condition, and prevention, including simple options like magnesium, is worth discussing even if no one has suggested it.

Note: this article is for general education and is not medical advice. Call 911 for a sudden, explosive or "worst ever" headache, or a headache with slurred speech, vision changes, trouble moving your arms or legs, loss of balance or confusion. Get medical help right away for a headache with fever and a stiff neck, after a head injury, or a new kind of headache after age 50. Talk to your doctor before taking magnesium above 350 mg a day, in pregnancy, or if you have kidney disease.

Understand your migraine pattern

A short check-in from Welltory about stress, sleep and sensitivity, and the load that may build up behind your migraine pattern. It does not diagnose migraine.

Why magnesium matters in migraine

Several lines of evidence link magnesium to migraine. Magnesium helps control how excitable nerve cells are, including through NMDA receptors that respond to glutamate, and it influences blood vessel tone and the release of inflammatory and pain-signalling substances. Some studies have found lower magnesium levels in the brain and blood of people with migraine, especially during attacks and in migraine with aura (1).

One leading theory of migraine aura, cortical spreading depression, is a slow wave of nerve-cell activity across the brain. Magnesium can dampen this wave in experimental models, which offers a plausible reason it might help migraine with aura in particular.

Low magnesium is also more likely in some groups that overlap with migraine: women with menstrual migraine, people taking acid-reducing medicines long term, and people with gut conditions or heavy alcohol use (3). That does not mean everyone with migraine is deficient; most people with migraine have normal blood magnesium. It does mean magnesium is a reasonable, low-cost preventive to try.

What the evidence shows

Prevention. In a meta-analysis of five randomised placebo-controlled trials, oral magnesium reduced migraine attack frequency by about 22–43%. The strongest single trial used 600 mg of trimagnesium dicitrate daily for 12 weeks and found a 41.6% reduction in attack frequency, compared with 15% on placebo (1). Not all trials were positive, and studies used different forms and doses.

Guidelines. The 2012 AAN/AHS guideline, now formally retired while new guidance is developed, rated oral magnesium Level B, "probably effective", for preventing episodic migraine (1). UK headache guidance and the Migraine Trust also list magnesium as a supplement worth considering (2).

Acute attacks. Intravenous magnesium is sometimes used in emergency departments. One study found that 1 g IV gave substantial pain relief in about half of patients who had low ionised magnesium, but a meta-analysis of five trials found no clear advantage over other treatments. Experts consider the evidence insufficient to recommend IV magnesium alone for acute attacks (1). Oral magnesium taken during an attack is not an acute treatment.

How much magnesium for migraines

How much magnesium for migraines is the most practical question, and the answer is higher than for general use:

  • Typical preventive dose: 400–600 mg of elemental magnesium a day (2).

  • A common starting point: 400 mg a day with food, sometimes increased if tolerated and not effective after a month or two (1).

  • Why it needs a doctor's agreement: the general upper limit for magnesium from supplements is 350 mg a day for adults, set mainly to avoid diarrhoea (3). Migraine doses go above that under medical guidance.

  • Who should not take it without a specialist: people with kidney disease, where magnesium can build up to dangerous levels; people with heart block or myasthenia gravis; and anyone taking interacting medicines.

How long does magnesium take to work for migraines? Plan for at least two to three months of daily use. Benefit in trials often appeared after about a month and grew over 12 weeks. Keep a headache diary from before you start, so you can compare migraine days per month rather than relying on memory. Our guide to keeping a migraine headache diary shows how.

Best magnesium for migraines: which form?

No trial compares forms directly for migraine (2). The choice comes down to how much magnesium the product delivers and how your gut copes with it:

FormUsed in migraine studies?Notes
Citrate (including trimagnesium dicitrate)Yes, including the strongest trialWell absorbed; can loosen stools at higher doses
OxideYes, commonlyCheap and high in elemental magnesium per tablet, but poorly absorbed and more likely to cause diarrhoea and stomach pain
GlycinateSuggested as an optionWell tolerated, fewer gut side effects; you may need more capsules to reach 400 mg
Gluconate, aspartateSuggested as optionsChelated forms, generally well tolerated
L-threonateNoVery little elemental magnesium per dose; not practical for migraine doses

Magnesium glycinate for migraines is a common choice for people who get diarrhoea with citrate or oxide. Magnesium citrate for migraines is a good option if your gut tolerates it and you want the form closest to the best trial. Whatever you choose, check the elemental magnesium amount on the label, not the total weight of the compound.

Magnesium for menstrual migraine

Many women with migraine notice attacks around their period. Some studies have looked at magnesium specifically for menstrual migraine and premenstrual symptoms, with encouraging but limited results. Daily magnesium through the whole cycle is the most common approach; some doctors suggest increasing it in the second half of the cycle. Our article on menstrual migraine covers timing and other options. Discuss the plan with your doctor, especially if you use hormonal contraception or are planning a pregnancy.

Riboflavin, CoQ10 and other supplements for migraine

SupplementEvidenceTypical doseNotes
MagnesiumLevel B; 22–43% fewer attacks in pooled trials (1)400–600 mg a dayDiarrhoea; avoid in kidney failure
Riboflavin (vitamin B2)Level B; a high-quality trial found fewer attacks after 3 months (1)400 mg a day for at least 3 monthsBright yellow urine; minimal side effects
Coenzyme Q10Level C ("possibly effective"); one trial found 48% of users halved their attacks vs 14% on placebo (1)Usually 100–300 mg a dayNot recommended in pregnancy due to limited safety data (2)
FeverfewMixed evidenceVariesAvoid in pregnancy; may interact with blood thinners
ButterburEarlier evidence of benefit—Unprocessed products can damage the liver; generally no longer recommended
Omega-3, probioticsLimited evidence (2)——

Combination products containing magnesium, riboflavin and CoQ10 are popular. Some combinations have outperformed placebo in trials, but check the doses: many contain far less than the amounts studied.

What vitamin deficiency causes headaches?

What vitamin deficiency causes headaches is a common search, but deficiencies are an uncommon cause of headaches in otherwise healthy people. Iron-deficiency anaemia can cause headaches along with tiredness and breathlessness. Low magnesium is associated with migraine. Low vitamin D has been linked to headaches in some studies, but trials of vitamin D for migraine are inconclusive. Dehydration, skipped meals, caffeine withdrawal, poor sleep and stress are far more common triggers. Our article on migraine triggers covers these in detail.

Magnesium and migraine medicines: what to check

The NIH magnesium fact sheet does not list triptans, beta-blockers, topiramate or amitriptyline among the medicines magnesium interacts with (3). That is not proof that every combination is right for you, so check your full list with your doctor or pharmacist. Points to raise:

  • Some antibiotics (tetracyclines, quinolones) should be taken at least 2 hours before or 4–6 hours after magnesium, and bisphosphonates at least 2 hours apart from it (3).

  • Levothyroxine: MedlinePlus lists antacids, many of which contain magnesium, among products that can interact with it; ask your pharmacist how far apart to take them (5).

  • Blood pressure and heart medicines, including the calcium channel blockers sometimes used for migraine prevention: tell your doctor before taking migraine doses of magnesium.

  • Kidney function should be checked before high doses: the risk of magnesium toxicity rises when the kidneys do not clear it well (3).

Do not stop or change prescribed migraine medicines without your doctor.

Magnesium in pregnancy and for teenagers

Migraine treatment options shrink in pregnancy. The Migraine Trust says magnesium and riboflavin are considered safe to take in pregnancy, but advises checking the dose with a doctor or pharmacist, who may suggest a lower dose than usual for migraine (2). Long-term high-dose intravenous magnesium in pregnancy has raised concerns about the baby's bones, which is one reason not to self-prescribe high doses.

For children and teenagers with migraine, doses are lower and should be set by a doctor.

A 12-week plan for trying magnesium

If you and your doctor decide to try magnesium for prevention, a structured plan makes the result easier to read:

  1. Weeks −4 to 0: baseline. Keep a headache diary for four weeks before starting. Count migraine days, note severity, what you took for attacks and how well it worked. If you menstruate, mark your cycle.

  2. Week 1: start low. Begin with about 200 mg of elemental magnesium with dinner, to see how your gut reacts.

  3. Weeks 2–4: build up. Increase to the dose agreed with your doctor, often 400 mg, split between two meals if needed.

  4. Weeks 4–12: hold steady. Keep the dose, the timing and your other preventive habits the same. Do not start other new supplements in the same period.

  5. Week 12: compare. Count migraine days in the last four weeks and compare with your baseline. A reduction of 50% or more is a strong response; 30% may still be worthwhile for you.

  6. Decide together with your doctor. Continue, adjust the dose or form, add riboflavin, or move on to a prescription preventive.

The most common reason people abandon magnesium is diarrhoea in the first weeks, usually from starting too high or using oxide. A slower start and a gentler form often solve it.

Living with migraine and magnesium: the questions people ask next

Can I get enough magnesium for migraine from food?

Food is a good base: pumpkin seeds, almonds, cashews, spinach, black beans, edamame and whole grains are rich in magnesium, and food magnesium does not cause the same diarrhoea as supplements. But the doses studied for migraine prevention, 400–600 mg of elemental magnesium a day on top of diet, are hard to reach with food alone. If you want to test magnesium as a preventive, a supplement at an agreed dose is the usual route, with a magnesium-rich diet alongside.

Can I take magnesium during a migraine attack?

Oral magnesium is a preventive treatment, taken daily over weeks; it does not reliably stop an attack that has already started. For attacks, use the acute treatment your doctor recommends, such as a pain reliever or a triptan, as early as possible. Intravenous magnesium is sometimes used in hospital, but the evidence for it as a stand-alone acute treatment is limited.

Can I take magnesium with triptans?

Ask your doctor or pharmacist. The NIH magnesium fact sheet does not list triptans among the medicines magnesium interacts with, and many people with migraine use magnesium for prevention and a triptan for attacks, but that is not proof the combination suits everyone. Tell your doctor about every supplement you take, keep magnesium apart from medicines it does affect, such as some antibiotics and bisphosphonates, and ask about spacing it from thyroid medicine.

What if magnesium gives me diarrhoea?

Diarrhoea is the most common side effect, especially with oxide and citrate. Try splitting the dose into two or three smaller doses with meals, switching to glycinate, or lowering the dose and building up slowly. If diarrhoea persists, stop magnesium and talk to your doctor about alternatives such as riboflavin.

Should I take magnesium and riboflavin together?

Some headache specialists suggest combining them. Some people prefer to start one at a time so they can tell which, if either, helps, since both take two to three months to judge. Riboflavin turns urine bright yellow, which is harmless.

Does magnesium help tension headaches too?

Evidence for magnesium in tension-type headache is much weaker than for migraine. If you have frequent headaches, getting the type right matters, because treatments differ. Our guide to headache or migraine explains the differences.

How do I know if magnesium is working for my migraines?

Compare your number of migraine days per month before starting and after two to three months of daily use. A meaningful preventive effect is often defined as a 50% or greater reduction in migraine days. Without a diary, small changes are easy to miss or to overestimate.

Before you blame yourself

People with migraine are often told it is "just a headache", that they should drink more water, or that they are bringing it on themselves with stress. Migraine is a neurological condition with a strong genetic component. Attacks are not a sign of weakness or a lack of self-control.

Prevention is under-used, and simple options like magnesium are often never mentioned. Asking about them is a reasonable step, not a fuss.

When to see a doctor

See a doctor if you have migraine on four or more days a month, if attacks are getting more frequent or severe, if you use pain relievers on more than 10–15 days a month (which can cause medication-overuse headache), or before starting magnesium at migraine doses.

Seek urgent care. Call 911 for a sudden, explosive or "worst ever" headache, or a headache with slurred speech, vision changes, trouble moving your arms or legs, loss of balance or confusion. Get medical help right away for a headache with fever and a stiff neck, after a head injury, or a new kind of headache after age 50 (4).

How to bring this up with your doctor

What to ask for, by name. "Could I try magnesium for migraine prevention, and what dose is safe for me?" Also: "Should I consider riboflavin or CoQ10, or a prescription preventive?"

What to bring. A headache diary for at least four weeks: migraine days, severity, what you took and whether it worked, your menstrual cycle if relevant, and all supplements and medicines.

What to say, out loud. "I have migraines on about [N] days a month. They affect [work / family / sleep]. I'd like to try prevention. Is magnesium a reasonable first step?"

If you're told magnesium won't help. Ask: "What would you suggest instead for prevention, and how will we measure whether it works?"

How long until you notice a difference? Most supplements take weeks, not days. See how long supplements take to work, and how to tell if one is working.

Start understanding your body

Learn what affects your energy, stress, sleep, and daily state. Get the app.

How Welltory helps — and what it cannot do

The limits first. Welltory is a general wellness product, not a medical device. It does not diagnose migraine, predict attacks or tell you whether magnesium works. A clinician should guide migraine treatment.

What it can do is help you keep the kind of record that makes a magnesium trial meaningful.

A short migraine check-in. If you want to look at the stress and sleep load behind your migraine pattern, you can take a short migraine check-in from Welltory. It asks about stress, sleep and sensory sensitivity; it does not diagnose migraine or replace a doctor.

Tag attacks and changes. On iOS with Apple Watch or Oura, when Welltory marks a stress or rest episode and asks "What happened?", tap, type or talk: "migraine started", "started magnesium 400", "period day 1", "skipped lunch", "short night". Over weeks, My Patterns shows which tags tend to appear with stress and recovery; some sections need a paid plan.

Look one to three days before attacks. Sleep Analysis uses Apple Watch or Oura data on iOS and syncs sleep from Samsung Health, Fitbit or Garmin Connect through Health Connect on Android (Sleep Analysis for Android). On iOS, Battery starts each morning from your resting heart rate on waking and your sleep (Today screen). Short nights and high-stress days before attacks are common patterns worth noticing. Our article on migraine and HRV explains what heart data can and cannot show.

A record for your doctor. From the web app you can export a CSV (Dashboard → choose a chart → Export) (export guide). Patterns are associations to discuss with your doctor, not proof of a trigger or of what helped.

How we made it

We based this article on a review of complementary treatments for migraine published in the Journal of Neuro-ophthalmology (2019), which summarises trials and the 2012 American Academy of Neurology and American Headache Society guideline, the Migraine Trust's guidance on supplements, and the NIH Office of Dietary Supplements magnesium fact sheet. Urgent headache signs follow MedlinePlus; the levothyroxine note follows the MedlinePlus drug page. Search questions came from what people in the United States most often ask about magnesium and migraine. For the product section, we checked every function against the Welltory Help Center on October 21, 2026.

Made with AI tools, then edited and fact-checked by the Welltory team. See our Editorial & AI policy.

Jane Smorodnikova, co-founder of Welltory, built the methodology behind how we read physiological data.

Written by Tatsiana Yashyna.

Discounts for blog readers: up to 36% off

See what affects your energy, stress, sleep, and daily state with Welltory

This article is for educational purposes only and is not medical advice. Supplements can interact with medicines and are not right for everyone; talk to your doctor or pharmacist before starting, stopping or combining them, especially if you are pregnant, breastfeeding, have kidney or liver disease or take prescription medicines. Call 911 for a sudden, explosive or "worst ever" headache, or a headache with slurred speech, vision changes, trouble moving your arms or legs, loss of balance or confusion. Get medical help right away for a headache with fever and a stiff neck, after a head injury, or a new kind of headache after age 50. Welltory is a general wellness product and does not diagnose, treat or prevent any condition. Sources were retrieved on October 21, 2026.

Was this helpful?

Ask AI for a summary of page

ChatGPTGeminiClaudePerplexityGrok

Written by Jane Smorodnikova

The founder and CEO of Welltory. A recognized tech leader with two Master's degrees and experience at MIT, she has scaled Welltory to over 17 million users.

Written by Tatsiana Yashyna

Deputy COO at Welltory. With a background in medicine and years of working with health data, she translates research and real physiological signals — sleep, stress, heart rate, and hormones — into clear, evidence-based explanations that help people understand what their bodies are telling them.

References

  1. Patel P, Minen MT. Complementary and integrative health treatments for migraine. Journal of Neuro-ophthalmology 2019;39(3):360–369. https://pmc.ncbi.nlm.nih.gov/articles/PMC7769000
  2. The Migraine Trust. Supplements for migraine. https://migrainetrust.org/
  3. National Institutes of Health, Office of Dietary Supplements. Magnesium: fact sheet for health professionals. https://ods.od.nih.gov/factsheets/Magnesium-HealthProfessional/
  4. MedlinePlus. Headaches: danger signs. https://medlineplus.gov/ency/article/003024.htm
  5. MedlinePlus. Levothyroxine. https://medlineplus.gov/druginfo/meds/a682461.html

FAQ