A headache can turn an ordinary day into an exercise in endurance. The lights seem too bright, concentration becomes difficult, and even familiar sounds can feel irritating. For some people, the discomfort passes relatively quickly. For others, particularly those living with migraine, headaches can become a recurring and genuinely debilitating problem.
It's hardly surprising that people look for ways to prevent them.
Alongside established headache treatments, one mineral has attracted considerable scientific attention: magnesium.
Better known for supporting normal muscle function, energy metabolism and the nervous system, magnesium is also involved in several biological processes that researchers believe may influence migraine.
Some clinical trials have found that regular magnesium supplementation can reduce migraine frequency in certain people. This has led to magnesium being discussed as a potential preventive option rather than simply another general wellness supplement.
But the evidence comes with important qualifications.
Magnesium is not a proven solution for every type of headache. Research supporting its use in migraine prevention is considerably stronger than the evidence for ordinary tension-type headaches.
And while magnesium is an essential dietary mineral, taking large supplemental doses isn't automatically harmless.
So, can magnesium help prevent headaches? Does magnesium deficiency cause migraines? And is magnesium glycinate, citrate or oxide the best option?
Here's what the research actually tells us, alongside practical UK nutritional guidance and the important safety considerations that often get lost in supplement discussions.
1. Can Magnesium Help Prevent Headaches?
Magnesium may help prevent migraine attacks in some people, but it has not been established as an effective preventive treatment for every type of headache.
That distinction matters because the word headache covers several different conditions.
A tension-type headache often causes a pressing or tightening sensation, typically affecting both sides of the head. Migraine, by contrast, is a neurological disorder that can involve moderate to severe headache pain, nausea, sensitivity to light or sound, and sometimes visual or sensory disturbances known as aura.
These conditions can overlap in their symptoms, but their underlying mechanisms and treatment approaches are not identical.
Magnesium has been investigated most extensively for migraine prevention.
Several controlled studies suggest that regular oral magnesium supplementation may reduce the number of migraine attacks experienced by some participants.
Professional headache organisations have therefore recognised magnesium as a potential preventive option, although the strength of evidence and recommendations vary between guidelines.
It is not, however, a guaranteed treatment.
Some people may benefit, while others experience little noticeable improvement.
There is also insufficient evidence to recommend magnesium as a universal preventive treatment for tension headaches or unexplained recurrent headaches.
THE KEY DISTINCTION
Migraine prevention: Regular magnesium supplementation has some supportive clinical evidence and may be considered with professional guidance.
Tension headaches: Evidence for magnesium supplementation is substantially less convincing.
Sudden headache relief: Taking an ordinary magnesium supplement is not an established way to immediately stop an acute headache.
It's also important to distinguish magnesium obtained through food from the higher supplemental doses sometimes used in migraine trials.
A balanced diet can support normal magnesium status and general neurological health, but eating more magnesium than you need has not been shown to prevent all headaches.
The most useful question isn't simply whether magnesium helps headaches. It's which type of headache you're experiencing, and whether magnesium has evidence for that particular condition.

2. Why Is Magnesium Important for the Nervous System?
Magnesium is an essential mineral involved in hundreds of enzyme-dependent reactions throughout the body.
It contributes to normal nervous system function, muscle function, electrolyte balance and energy-yielding metabolism.
These roles make it particularly relevant to the brain, where electrical and chemical signalling must be carefully regulated.
Nerve cells communicate through complex processes involving neurotransmitters, ion channels and changes in electrical activity.
Magnesium participates in several of these processes.
One area of particular interest involves the N-methyl-D-aspartate receptor, usually abbreviated to NMDA.
NMDA receptors are involved in excitatory neurotransmission and the regulation of neuronal activity.
Magnesium helps regulate the activity of these receptors under normal physiological conditions.
Researchers have proposed that changes in magnesium availability could influence neuronal excitability, potentially affecting susceptibility to migraine in certain individuals.
Another proposed mechanism involves cortical spreading depression.
This is a wave of altered electrical activity that travels across parts of the brain and is associated with migraine aura.
Magnesium may influence pathways involved in this process, although the precise relationship between magnesium supplementation and migraine prevention remains under investigation.
Magnesium is also involved in normal muscle contraction and relaxation.
This sometimes leads to the assumption that magnesium must relieve headaches caused by tight neck or shoulder muscles.
But a mineral's role in normal muscle function doesn't automatically prove that taking extra amounts treats tension-type headaches.
The body tightly regulates many aspects of mineral balance, and normal physiological function depends on adequate intake rather than unlimited supplementation.
Magnesium's role in the nervous system provides a plausible scientific explanation for why it might influence migraine.
However, biological plausibility must still be supported by clinical trials demonstrating meaningful improvements in real people.
Magnesium is essential for neurological health, but that fact alone doesn't establish it as a headache treatment.
3. Can Magnesium Deficiency Cause Headaches?
Magnesium deficiency can affect the nervous system and muscles, particularly when deficiency is significant.
But the relationship between low magnesium status and headaches is not straightforward.
Some studies have reported differences in magnesium status between people with migraine and those without it.
Researchers have also investigated whether magnesium levels fluctuate during migraine attacks or differ in particular tissues.
However, these findings don't establish that every migraine is caused by magnesium deficiency.
Nor does experiencing frequent headaches automatically mean someone needs magnesium supplements.
True magnesium deficiency is a medical issue, and its symptoms can overlap with many other conditions.
Potential signs of significant deficiency may include:
- Muscle weakness: Reduced muscle function or unusual weakness.
- Muscle cramps or spasms: Particularly when mineral imbalance is more pronounced.
- Fatigue: General tiredness or reduced energy.
- Neurological symptoms: Severe deficiency can affect nerve and muscle excitability.
- Abnormal heart rhythms: A potentially serious consequence of substantial magnesium imbalance.
These symptoms are not specific enough to diagnose magnesium deficiency without clinical assessment.
People with certain gastrointestinal conditions, poorly controlled diabetes, alcohol dependence or medication-related mineral losses may be at greater risk of inadequate magnesium status.
Some medicines, including particular diuretics and long-term proton pump inhibitors, can also affect magnesium levels.
It is worth remembering that most magnesium in the body is found in bones and tissues, with only a small proportion circulating in the blood.
Serum magnesium testing can be useful when deficiency is suspected, but a normal result does not necessarily describe every aspect of the body's magnesium stores.
That doesn't mean everyone with headaches needs specialised mineral testing.
It means assessment should be based on symptoms, medical history, risk factors and clinical judgement.
Importantly, headaches have numerous possible causes unrelated to magnesium, including migraine, tension-type headache, medication overuse, infections and other medical conditions.
Correcting genuine magnesium deficiency is important for health, but magnesium deficiency should not be assumed to explain every recurring headache.
4. What Does Research Say About Magnesium and Migraine Prevention?
Of all the potential uses of magnesium for headaches, migraine prevention has the strongest research foundation.
Several randomised controlled trials have investigated whether taking oral magnesium regularly can reduce migraine frequency.
One frequently cited study published in 1996 examined oral magnesium supplementation in people with migraine.
Participants receiving magnesium experienced a greater reduction in migraine attack frequency than those receiving placebo over the study period.
Other studies have reported improvements in some migraine-related outcomes, although results have not been universally positive.
Differences between trials include the magnesium compound used, dose, duration, participant characteristics and methods of measuring migraine frequency.
These variations make it difficult to establish one universally effective protocol.
In 2012, the American Academy of Neurology and American Headache Society classified magnesium as probably effective for episodic migraine prevention in an evidence review.
That historical assessment is frequently referenced by migraine organisations.
However, the underlying guideline was subsequently retired, so its classification should not be mistaken for a current universal prescribing recommendation.
Magnesium continues to be discussed as a potential preventive option, particularly for people who experience migraine with aura or menstrual migraine.
The proposed benefit may relate to magnesium's effects on neuronal excitability and processes involved in migraine pathophysiology.
But even where supplementation helps, it is generally intended to reduce attack frequency or burden rather than eliminate migraine altogether.
| Headache condition | Magnesium evidence | Practical interpretation |
|---|---|---|
| Episodic migraine | Several clinical trials and reviews suggest possible preventive benefits. | May be considered as part of an individualised prevention plan. |
| Migraine with aura | Mechanistic rationale and some supportive clinical evidence. | Worth discussing with a headache clinician when prevention is needed. |
| Menstrual migraine | Some smaller studies suggest potential benefit. | Evidence is promising but not definitive. |
| Tension-type headache | Insufficient strong evidence for routine magnesium prevention. | Other established management approaches remain important. |
For someone experiencing frequent migraine attacks, the decision to use magnesium should consider attack frequency, disability, other treatments, existing health conditions and medication interactions.
It should not be based solely on the fact that magnesium is sold as a nutritional supplement.
The evidence supports magnesium as a possible migraine-prevention option—not a guaranteed cure or a replacement for appropriate medical care.

5. Does Magnesium Help With Tension Headaches?
Tension-type headaches are among the most common headache disorders.
They often involve a dull, pressing or tightening sensation, sometimes described as a band around the head.
Unlike migraine, they are not typically characterised by the same combination of nausea, pronounced light sensitivity and neurological symptoms.
Although muscle tenderness can occur, tension-type headaches are more complicated than simply having tight muscles.
They may involve changes in pain processing, stress-related factors and other physiological mechanisms.
Because magnesium contributes to normal muscle and nervous system function, it is sometimes marketed as a way to relieve tension headaches.
However, the clinical evidence supporting magnesium supplements for tension-type headache prevention is limited.
We cannot assume that results from migraine studies apply equally to tension headaches.
Nor does magnesium's involvement in normal muscle relaxation demonstrate that additional supplementation reduces headache frequency.
Someone with inadequate magnesium intake should address that nutritional shortfall for general health.
But taking high-dose magnesium specifically for tension headaches is not supported by the same body of evidence as migraine prevention.
Other approaches may be more appropriate, depending on the individual.
These can include maintaining regular sleep, managing stress, addressing neck or jaw problems where relevant, and reviewing how frequently pain-relieving medicines are used.
Frequent use of acute headache medication can itself contribute to medication-overuse headache.
People experiencing recurrent tension-type headaches may benefit from assessment and a structured management plan rather than repeatedly increasing supplement doses.
It's also worth remembering that not every headache resembling tension-type headache is harmless.
A new, unusual, progressively worsening or otherwise concerning headache requires appropriate medical attention.
Magnesium may be relevant to overall nutritional health, but it should not be presented as an established treatment for tension-type headaches.
6. Which Type of Magnesium Is Best Studied for Headaches?
Magnesium supplements come in several forms, including magnesium oxide, citrate, glycinate and bisglycinate.
These names refer to the compounds used to deliver magnesium.
Different forms can vary in their magnesium content, solubility, absorption characteristics and gastrointestinal tolerability.
However, better absorption does not automatically mean stronger evidence for migraine prevention.
Magnesium oxide is one of the forms most frequently discussed in migraine-prevention guidance and clinical practice.
It has a relatively high proportion of elemental magnesium by weight, although its fractional absorption is generally lower than that of some more soluble magnesium compounds.
Magnesium citrate has also been investigated in migraine research and is generally considered a more soluble form.
Magnesium glycinate and bisglycinate are popular because of their perceived digestive tolerability, but direct clinical evidence demonstrating that they are superior for migraine prevention is limited.
That means the most fashionable form is not necessarily the best-studied one.
| Magnesium form | Key characteristic | Migraine research |
|---|---|---|
| Magnesium oxide | High elemental magnesium proportion; may cause gastrointestinal effects. | Frequently used or recommended in migraine-prevention protocols. |
| Magnesium citrate | Relatively soluble; can have laxative effects. | Included in some migraine supplementation studies. |
| Magnesium glycinate | Often selected for perceived digestive comfort. | Limited direct evidence of superior migraine prevention. |
| Magnesium bisglycinate | A chelated form involving glycine. | No convincing proof of superiority over established study formulations. |
Another important distinction is between the total weight of a magnesium compound and the amount of elemental magnesium it supplies.
For example, a label describing a quantity of magnesium citrate doesn't necessarily mean that the entire weight is elemental magnesium.
When comparing supplements, look for the amount of magnesium listed in the nutritional information rather than relying on the compound name alone.
A practical example is BetterYou Magnesium Water – Hydrate, which provides 180mg of elemental magnesium per can from a formula containing magnesium citrate and glycinate. It illustrates how magnesium can be supplied in different forms, but the product itself has not been established as a migraine-prevention treatment.
Its drink format may be convenient for people reviewing their magnesium intake, but convenience should not be confused with proven clinical effectiveness for headaches.
It's also important to avoid assuming that drinking several cans to reach a dose used in a migraine trial would be appropriate.
Higher magnesium intakes can cause gastrointestinal side effects, and preventive supplementation should be discussed with a healthcare professional.
The best-studied form for migraine isn't necessarily the most heavily marketed form, and the correct dose matters as much as the compound name.

7. How Much Magnesium Is Typically Used for Migraine Prevention?
Magnesium dosage is one of the most important—and potentially misleading—parts of this discussion.
In the UK, the NHS states that adults aged 19–64 generally need approximately 300mg of magnesium daily for men and 270mg for women.
These figures refer to normal nutritional requirements from the diet.
They are not migraine-treatment doses.
By contrast, migraine-prevention research and clinical resources often discuss oral magnesium doses of approximately 400–600mg daily.
These amounts are usually described in terms of elemental magnesium, although individual studies and product formulations must be checked carefully.
Research doses should not be mistaken for routine self-supplementation recommendations.
High supplemental magnesium intake can cause diarrhoea, abdominal cramps and nausea.
The NHS warns that taking more than 400mg of magnesium from supplements for a short period can cause diarrhoea, and notes uncertainty about the long-term effects of high doses.
Different regulatory authorities also use different reference limits for supplemental magnesium, so a single universal safety threshold should not be assumed.
People with impaired kidney function face additional risks because the kidneys play an important role in removing excess magnesium.
Magnesium can also interfere with the absorption of certain medicines, including some antibiotics and medicines used for osteoporosis.
Other medicines can affect magnesium balance.
For these reasons, someone considering migraine-prevention doses should speak to an appropriate healthcare professional first.
Magnesium Amounts: Nutrition vs Migraine Research
Illustrative comparison of magnesium quantities. The bars use a 600mg reference scale; they are not recommendations to supplement at these levels.
Important: The first two values describe total daily dietary requirements. The latter two describe doses discussed in migraine research and clinical resources, often as supplements. They are not directly interchangeable and must not be added together as if they were identical recommendations. High supplemental doses require professional advice.
The aim of migraine prevention is to reduce the frequency or burden of attacks while minimising side effects.
A dose that causes persistent diarrhoea or interacts with medication is not a sensible choice simply because it appeared in a study.
Magnesium should be approached as a potentially useful preventive intervention with real dosing considerations—not as a mineral that becomes more effective the more you consume.
8. How Long Does Magnesium Take to Help With Headaches?
Magnesium is generally investigated as a preventive intervention taken regularly over time.
It isn't usually intended to work like an acute painkiller taken when a headache has already started.
Clinical trials examining oral magnesium for migraine prevention have commonly assessed outcomes over several weeks or months.
That means someone starting a clinician-approved magnesium regimen shouldn't necessarily expect an immediate change after their first dose.
When magnesium is effective for migraine prevention, improvements may become apparent over a period of weeks, with preventive treatments often assessed over roughly two to three months.
However, this is a practical evaluation period rather than a guaranteed biological countdown.
Some people may notice changes sooner, while others may experience no meaningful benefit.
One useful approach is to keep a headache diary.
This can help distinguish genuine improvements from ordinary fluctuations in headache frequency.
A diary might record:
- Headache days: How many days each month involve headache symptoms.
- Migraine attacks: Their frequency, duration and severity.
- Associated symptoms: Such as nausea, light sensitivity or aura.
- Medication use: How often acute headache treatments are needed.
- Possible triggers: Changes in sleep, meals, stress or other relevant factors.
Recording this information before and during treatment can make it easier to discuss results with a healthcare professional.
It's also important not to change several supplements and medicines at once without guidance.
If multiple interventions begin simultaneously, it becomes difficult to determine which one contributed to any improvement or adverse effect.
People experiencing frequent migraines may benefit from established prescription preventive treatments, depending on their symptoms and medical history.
Magnesium can sometimes be discussed alongside those options, but it should not delay effective treatment.
Preventing migraine is about meaningful improvement over time, not expecting one supplement to switch headaches off overnight.
9. Can You Get Enough Magnesium From Food?
For most healthy adults, a varied diet can provide sufficient magnesium without supplementation.
Magnesium occurs naturally in numerous foods, particularly plant-based ingredients.
Useful sources include leafy green vegetables, nuts, seeds, wholegrains, beans and lentils.
These foods also provide other nutrients, including fibre, vitamins and minerals, making them valuable components of a balanced eating pattern.
Meeting your normal magnesium requirement through food is a sensible foundation for neurological and general health.
It doesn't guarantee that migraine attacks will stop, but it helps avoid inadequate intake.
Some particularly useful foods include:
| Food | Approximate magnesium | Other benefits |
|---|---|---|
| 30g pumpkin seeds | Approximately 150mg | Protein, healthy fats and zinc. |
| 30g almonds | Approximately 80mg | Unsaturated fats, fibre and vitamin E. |
| 100g cooked spinach | Approximately 80mg | Folate and other micronutrients. |
| 150g cooked black beans | Approximately 100mg | Fibre and plant protein. |
| 2 slices wholemeal bread | Approximately 45–60mg | Fibre and carbohydrate for everyday energy. |
Values are approximate and vary with food variety, preparation method and serving size.
Someone who regularly eats wholegrains, vegetables, nuts, seeds and legumes may already obtain substantial magnesium through ordinary meals.
However, people with limited dietary variety or particular nutritional requirements may need to review their intake more carefully.
Multivitamins sometimes contain magnesium, although the amounts may be modest compared with those investigated in migraine trials.
For example, Per4m Multi Vita+min provides 66mg of magnesium per capsule in a formula containing magnesium bisglycinate alongside numerous other vitamins and minerals. It illustrates how a general multivitamin can contribute to overall magnesium intake without being a dedicated migraine-prevention product.
Importantly, this formula also contains iron and other nutrients, so it isn't automatically appropriate for everyone to use.
It should not be taken simply to increase magnesium intake without considering the complete ingredient profile.
And because its magnesium contribution is relatively modest, it should not be confused with the higher doses used in some migraine-prevention research.
For most people, the first priority should be dietary adequacy rather than attempting to recreate a clinical supplementation protocol using multiple general wellness products.
A magnesium-rich diet supports normal health, but it should not be marketed as a guaranteed migraine treatment.

10. Should You Take Magnesium Supplements to Help Prevent Headaches?
Whether magnesium supplementation is worthwhile depends primarily on the type of headache, the frequency of symptoms and your individual health circumstances.
For someone experiencing occasional tension-type headaches, magnesium supplementation may offer little proven benefit beyond correcting inadequate nutritional intake.
For someone experiencing recurrent migraine attacks, however, magnesium may be worth discussing as part of a preventive treatment plan.
The decision should be based on clinical relevance and safety, not simply on the popularity of magnesium supplements.
There are several practical questions to consider.
First, are your headaches actually migraines?
Migraine can involve throbbing or pulsating pain, nausea, sensitivity to light and sound, and sometimes aura.
However, symptoms vary, and not everyone with migraine experiences all of these features.
Correct diagnosis matters because different headache conditions respond to different treatments.
Second, how frequently do headaches occur?
Someone experiencing frequent or disabling migraines may benefit from preventive treatment, but that doesn't necessarily mean magnesium is the most appropriate option.
Third, are there medical reasons to avoid or adjust magnesium supplementation?
Kidney disease is particularly important because impaired magnesium excretion can increase the risk of magnesium accumulation.
Medication interactions also matter, especially with certain antibiotics and medicines used for bone health.
Pregnant or breastfeeding individuals should obtain professional advice before using magnesium specifically at migraine-prevention doses.
Fourth, what is your current magnesium intake?
Someone already consuming adequate magnesium through food and supplements may not need an additional general-purpose product.
Finally, are there other aspects of migraine management that need attention?
Regular meals, adequate hydration, consistent sleep, appropriate acute medication and an individualised preventive plan can all be relevant.
Identifying medication-overuse headache is also important when pain-relieving medicines are used frequently.
It's also important to recognise headache warning signs.
A sudden, extremely severe headache, particularly one reaching maximum intensity within seconds or minutes, requires emergency assessment.
Headaches accompanied by new neurological symptoms, confusion, seizures, fever with neck stiffness, or symptoms following significant head injury may also require urgent medical attention.
These situations should never be managed by trying supplements first.
For recurrent but non-emergency headaches, a GP or appropriate clinician can help determine whether migraine prevention, further investigation or another treatment approach is needed.
Magnesium can be a reasonable subject to discuss in migraine management, but it works best as part of an informed, individualised approach rather than a universal solution.
Conclusion
So, can magnesium help prevent headaches?
For some people with migraine, possibly yes.
Magnesium has a plausible neurological role and a meaningful body of clinical research supporting its use as a potential migraine-prevention option.
However, the evidence is less convincing for tension-type headaches, and there is no basis for assuming that magnesium prevents every form of head pain.
Magnesium oxide is among the best-studied forms for migraine prevention, while citrate has also been investigated. Glycinate and bisglycinate may be useful ways to consume magnesium, but they have not been shown to be superior migraine treatments.
It's also important to distinguish normal dietary requirements from the substantially higher supplemental doses sometimes used in clinical research.
Those doses can cause gastrointestinal side effects and may be unsuitable for people with certain medical conditions or medication regimens.
For most healthy adults, eating a varied diet containing nuts, seeds, wholegrains, legumes and leafy vegetables is a sensible way to maintain adequate magnesium intake.
For people experiencing frequent migraines, professional advice can help determine whether magnesium deserves a place alongside established preventive strategies.
Magnesium is an important mineral, and it may be useful for migraine prevention. But understanding the type of headache, the evidence and the appropriate dose matters far more than simply taking more of it.
Frequently Asked Questions
1. Can magnesium help prevent headaches?
Magnesium may help reduce migraine frequency in some people, but evidence for preventing ordinary tension-type headaches is much weaker. It is not a universal headache treatment.
2. Does magnesium deficiency cause headaches?
Magnesium deficiency can affect the nervous system, and altered magnesium status has been investigated in migraine. However, headaches alone do not establish that someone has a magnesium deficiency.
3. Is magnesium effective for migraine prevention?
Several clinical trials suggest possible preventive benefits. Magnesium is recognised by some headache organisations as an option worth considering, although results vary and it is not guaranteed to work.
4. Does magnesium help with tension headaches?
There is insufficient strong clinical evidence to recommend magnesium supplements routinely for tension-type headache prevention. Correcting inadequate dietary intake remains important for general health.
5. Which magnesium form is best for migraines?
Magnesium oxide is one of the forms most frequently used in migraine-prevention protocols. Magnesium citrate has also been studied, while evidence that glycinate or bisglycinate is superior remains limited.
6. Is magnesium glycinate good for headaches?
Magnesium glycinate can contribute to magnesium intake, but there is limited direct evidence demonstrating that it specifically prevents headaches or outperforms other magnesium forms for migraine.
7. How much magnesium is used for migraine prevention?
Research and clinical resources commonly discuss approximately 400–600mg of elemental magnesium daily. These amounts should not be treated as routine self-supplementation recommendations and require professional guidance.
8. How long does magnesium take to prevent migraines?
Preventive benefits, when they occur, may become apparent over several weeks. Treatment response is often evaluated over approximately two to three months, although individual outcomes vary.
9. What foods are high in magnesium?
Useful sources include pumpkin seeds, almonds, spinach, beans, lentils and wholegrains. A varied diet can help most healthy adults meet their normal magnesium requirements.
10. Can magnesium supplements cause side effects?
Yes. Higher doses can cause diarrhoea, nausea and abdominal cramps. Excess magnesium can be particularly dangerous for people with impaired kidney function, and supplements can interact with certain medicines.
