
A throbbing headache, nausea, and sensitivity to light can turn an ordinary day into a difficult one. If you experience migraines often, you may have come across magnesium supplements as a possible way to prevent them. But can low magnesium levels actually cause migraines, and how much magnesium might help?
The answer is promising, but there’s a catch. Magnesium plays a role in normal nerve and muscle function, and research suggests that supplements may help reduce migraine attacks in some people. However, not everyone with migraines has a magnesium deficiency, and supplements aren’t a guaranteed fix [1, 2].
Here’s what you need to know about magnesium, migraine prevention, the recommended dose, and the precautions to follow.
What Is the Link Between Magnesium and Migraines?

Magnesium is an essential mineral that helps your body maintain normal nerve function, muscle movement, blood pressure, and energy production. Your brain also relies on magnesium to regulate signals between nerve cells [1].
When magnesium levels are low, nerve cells may become more sensitive to stimulation. Researchers believe this could contribute to the brain changes involved in migraines, including the release of chemicals that transmit pain [2].
Magnesium may also help regulate a process called cortical spreading depression. This is a wave of electrical activity across the brain associated with migraine aura, which can cause visual disturbances, tingling, or other sensory changes before a headache [2].
However, researchers haven’t established that low magnesium is the cause of every migraine. Magnesium may help prevent attacks even when a clear deficiency hasn’t been identified [1, 2].
Can Low Magnesium Cause Headaches?

Yes, low magnesium levels may contribute to headaches in some people, but headaches alone don’t confirm a magnesium deficiency [1, 2].
Severe magnesium deficiency can affect nerve and muscle function. Other symptoms may include muscle cramps, weakness, fatigue, and loss of appetite. In serious cases, it can cause abnormal heart rhythms [1].
You may be more likely to develop low magnesium levels if you have certain digestive conditions that affect nutrient absorption, uncontrolled diabetes, or long-term alcohol misuse. Some medicines, including certain diuretics and acid-reducing medicines, can also affect magnesium levels [1].
That said, migraines have several possible triggers, including hormonal changes, poor sleep, stress, dehydration, and skipped meals. You shouldn’t assume that magnesium is the problem simply because your headaches keep returning.
A healthcare professional can assess your symptoms, medical history, medicines, and diet to decide whether testing is needed.
Does Magnesium Help Prevent Migraines?

Research suggests that magnesium supplements may help some people experience fewer migraine attacks. However, the evidence isn’t equally strong for everyone [1, 3].
The American Migraine Foundation identifies magnesium as a possible preventive option, particularly for people who experience migraine with aura or menstrual migraines. Some clinical trials have also found a reduction in migraine frequency with daily magnesium supplementation [2].
Note: The evidence is limited, and individual responses vary.
Magnesium may be worth discussing with your doctor if your migraines tend to occur around your period or begin with visual changes, such as flashing lights or blind spots.
Keep in mind that magnesium is a preventive option, not a guaranteed treatment for an ongoing migraine attack. It also doesn’t replace prescribed migraine medicines when those are needed.
What Is the Right Magnesium Dose for Migraines?
Studies and headache guidelines commonly discuss 400–600 mg of magnesium per day for migraine prevention. Magnesium oxide is one of the forms used in research [2, 3].
However, this is a treatment dose, not a general daily nutrition target. The usual recommended dietary allowance for adult women is 310–320 mg of magnesium per day from all sources, while adult men generally need 400–420 mg. [1] Always seek advice from your healthcare professional about the correct dose and frequency of use.
The US National Institutes of Health sets an upper limit of 350 mg per day for magnesium from supplements and medicines in healthy adults, unless a healthcare professional advises otherwise. This limit doesn’t include magnesium naturally present in food. Migraine-prevention regimens may exceed it, so don’t start a high dose without medical guidance [1, 3].
The label matters, too. A supplement may list the weight of the magnesium compound rather than the amount of elemental magnesium your body receives. These numbers aren’t interchangeable.
To identify elemental magnesium, check the product’s composition or supplement facts panel. Look for a line that says “Magnesium” followed by an amount in mg, often with the source in brackets, such as “Magnesium 200 mg (as magnesium citrate).” This indicates the amount of elemental magnesium per stated serving. If the label only lists the weight of a compound, such as magnesium glycinate 1,000 mg, the elemental magnesium content may be different. Check the serving size and ask the manufacturer or pharmacist if the amount isn’t clear.
Your doctor can help you choose the appropriate formulation and dose based on your health, other medicines, and tolerance.
There’s no single magnesium supplement that works best for everyone. Magnesium oxide is commonly studied for migraines, while other forms, such as magnesium citrate and glycinate, are also available. Evidence comparing their effectiveness for migraine prevention remains limited [2, 4].
How Long Does Magnesium Take to Work?
Magnesium isn’t usually an instant solution for recurring migraines. Preventive treatment is generally assessed over several weeks, and some studies have evaluated results after around 8–12 weeks [3].
If your doctor recommends magnesium, keep a headache diary. Record when each migraine starts, how long it lasts, how severe it feels, and whether you experience nausea, light sensitivity, or aura.
This makes it easier to see whether your headaches are becoming less frequent or less severe. If you don’t notice an improvement, speak to your doctor rather than increasing the dose yourself.
Which Foods Are Rich in Magnesium?
Food is a good starting point for meeting your daily magnesium needs. Include a variety of magnesium-rich foods in your regular meals [1].
Pumpkin seeds, almonds, cashews, peanuts, beans, lentils, whole grains, and green leafy vegetables are useful sources. You can add nuts and seeds to breakfast, eat dal with whole-grain roti, or include spinach and other leafy vegetables in your meals [1].
For more ideas, read 7 Folate-Rich Foods to Add to Your Pregnancy Diet. Although that article focuses on folate, several foods commonly included in a balanced diet can also contribute magnesium.
Your body needs several nutrients to function well, and no single food can prevent every migraine. Focus on a varied diet rather than relying on one ingredient or supplement.
What Are the Side Effects of Magnesium Supplements?
Magnesium supplements can cause diarrhoea, nausea, and stomach cramps, especially at higher doses. Taking more than you need doesn’t necessarily improve migraine prevention and may increase these problems [1, 3].
People with kidney disease need particular caution because their kidneys may not remove excess magnesium effectively. Very high magnesium levels can cause low blood pressure, weakness, breathing problems, and abnormal heart rhythms [1].
Magnesium can also interfere with the absorption of certain antibiotics and medicines used for osteoporosis. If you take regular medicines, ask your doctor whether you need to adjust their timing [1, 2].
Don’t increase your dose if your migraines continue. Your doctor can help determine whether magnesium is suitable for you or whether another preventive treatment may work better.
When Should You See a Doctor for Headaches?
Speak to a healthcare professional if your headaches happen frequently, interfere with work or daily activities, or are becoming more severe. You may benefit from a migraine assessment and a treatment plan that considers both immediate relief and prevention.
Seek urgent medical attention for a sudden, extremely severe headache, a headache with weakness or difficulty speaking, new confusion, fever with a stiff neck, or a severe headache after a head injury [5].
Don’t assume that a new or unusual headache is caused by low magnesium. Some headaches need prompt assessment.
Magnesium may be a useful part of migraine prevention, especially for people with aura or menstrual migraines. But the right approach depends on your symptoms, health history, and other treatments. Start with a conversation with your doctor, not a high-dose supplement.
Frequently Asked Questions
1. Can low magnesium levels cause migraines?
Low magnesium may contribute to migraine attacks in some people by affecting nerve signaling. However, migraines can occur even when magnesium levels are normal, and low magnesium isn’t the only possible cause. [1,2]
2. What is the best magnesium dose for migraines?
Studies commonly use 400–600 mg daily for migraine prevention. The appropriate dose depends on the formulation and the amount of elemental magnesium (elemental magnesium is the actual amount of magnesium in a supplement that your body receives). Consult your doctor before starting this dose because it can exceed the usual upper limit for supplemental magnesium [2, 3.]
3. Which type of magnesium is best for migraines?
Magnesium oxide is commonly used in migraine-prevention studies. Magnesium citrate and glycinate are other available forms, but evidence doesn’t establish one as the best option for everyone [2, 4].
4. How long does magnesium take to reduce migraines?
It may take several weeks to notice a change. Preventive treatment is often assessed over 8–12 weeks, depending on your treatment plan. Track your headaches and discuss your progress with your doctor [3].
5. Can magnesium help with menstrual migraines?
Yes, daily magnesium may help prevent menstrual migraines in some people. If your headaches regularly occur before or during your period, discuss magnesium and other preventive options with your healthcare professional [2].
6. Can you get enough magnesium from food?
Yes, many people can meet their magnesium needs through a balanced diet that includes nuts, seeds, beans, lentils, whole grains, and leafy green vegetables. Supplements may be considered when dietary intake is inadequate or when a clinician recommends them [1].
7. Is it safe to take magnesium every day?
Daily magnesium may be appropriate for some people, but safety depends on the dose, kidney function, and other medicines you take. High supplemental doses can cause diarrhea and abdominal cramps. Check with your doctor before using magnesium regularly for migraine prevention [1, 3].
8. Can magnesium stop a migraine immediately?
Oral magnesium isn’t a reliable way to stop an ongoing migraine immediately. Its main role is prevention. If you experience frequent or severe attacks, ask your doctor about treatments for acute migraine as well as preventive options [2, 3].
References
- National Institutes of Health, Office of Dietary Supplements. Magnesium: Health Professional Fact Sheet. Available from: https://ods.od.nih.gov/factsheets/Magnesium-HealthProfessional/
- American Migraine Foundation. Magnesium and Migraine. Available from: https://americanmigrainefoundation.org/resource-library/magnesium/
- National Center for Complementary and Integrative Health. Headaches and Complementary Health Approaches: What the Science Says. Available from: https://www.nccih.nih.gov/health/providers/digest/headaches-and-complementary-health-approaches-science
- The Migraine Trust. Supplements for migraine. Available from: https://migrainetrust.org/live-with-migraine/healthcare/treatments/supplements/
- National Center for Complementary and Integrative Health. Headaches: What You Need to Know. Available from: https://www.nccih.nih.gov/health/headaches-what-you-need-to-know
Related reading
- 5 Supplements People With Hypothyroidism May Need
- Low-FODMAP Diet: Beginner Basics and Food Chart
- Iron Supplements: 7 Things That Affect Absorption
(The article is written by Mantasha, Sr. Executive, Clinical Health & Content, and reviewed by Dr Syeda Aafia, Clinical Health & Content, Medical Affairs.)