Migraines affect an estimated 10 million people in the UK, making them one of the most disabling neurological conditions in the country and the leading cause of disability in adults under 50 worldwide. Unlike ordinary headaches, migraines involve complex biological mechanisms including neurovascular dysfunction, neuroinflammation, and disruption to neurotransmitter signalling. Growing research points to specific nutritional deficiencies, particularly magnesium, B12, and vitamin D, alongside inflammatory markers and hormonal patterns, as significant contributors to migraine frequency and severity. Understanding which of these factors are relevant to your migraine pattern specifically requires looking at the biomarkers most commonly involved, and this is where a targeted blood test becomes useful.
Magnesium is one of the most consistently studied nutritional factors in migraine research. It plays a direct role in regulating neuronal excitability and preventing the cortical spreading depression that triggers migraine attacks. Studies have found that up to 50% of people experiencing migraine attacks have low serum or intracellular magnesium levels during an episode. Magnesium also regulates the NMDA receptor (involved in pain signalling) and supports blood vessel stability. Deficiency is common in the general population and easy to miss on standard blood panels, since serum magnesium can appear normal even when cellular stores are low.
Vitamin B12 has a well-documented relationship with migraine. Research has found that people with migraine have significantly lower B12 levels than healthy controls, and that higher B12 levels are associated with a meaningfully lower likelihood of having migraines. The biological mechanism runs through nitric oxide metabolism and homocysteine: B12 deficiency elevates homocysteine, which increases nitric oxide production and can trigger vasodilatation and neuroinflammation in the brain. For people with migraine with aura specifically, measuring both B12 and homocysteine provides a useful window into this pathway.
Low vitamin D levels are consistently associated with higher migraine frequency. Vitamin D receptors are present in the brain, including the hypothalamus, and the active form of the vitamin has anti-inflammatory properties that may moderate migraine-related neuroinflammation. There is also an indirect pathway: vitamin D is required for intestinal magnesium absorption, which means that vitamin D deficiency can compound magnesium deficiency and worsen both pathways simultaneously. Testing both markers together provides a more complete picture than either in isolation.
Oestrogen fluctuations are one of the most powerful migraine triggers in women. Migraines are approximately three times more common in women than men, and a large proportion of female migraineurs report attacks clustered around menstruation, when oestrogen drops sharply before the period. This pattern, often called menstrual migraine or hormonally triggered migraine, reflects sensitivity to oestrogen withdrawal at the trigeminovascular level. Perimenopause, when oestrogen levels become more erratic, is another common period of worsening frequency. Understanding the hormonal picture alongside nutritional biomarkers gives a more complete view of what is driving the pattern.
Elevated markers of systemic inflammation, particularly C-reactive protein (CRP), are associated with both increased migraine frequency and greater severity. Neuroinflammation appears to play a role in sensitising the trigeminovascular system, the pain network involved in migraine attacks. Persistent low-grade inflammation (driven by poor diet, sedentary behaviour, sleep disruption, or gut dysbiosis) creates a biological environment that lowers the threshold for a migraine attack. Measuring CRP as part of a broader health panel identifies whether systemic inflammation is a background contributor to migraine frequency.
Both hypothyroidism and hyperthyroidism are associated with increased headache and migraine frequency. Thyroid hormone directly influences blood vessel tone, neurotransmitter metabolism, and the body's overall inflammatory status: all mechanisms relevant to migraine pathophysiology. Subclinical hypothyroidism (elevated TSH with normal T4) is common and frequently missed, making thyroid function a worthwhile addition to any comprehensive migraine assessment, particularly in women and those with other symptoms of thyroid imbalance.
Sleep disruption, both too little and too much, is among the most commonly reported migraine triggers. The relationship is bidirectional: migraines disrupt sleep, and poor sleep lowers the threshold for migraine attacks. Cortisol dysregulation from chronic stress creates a hormonal environment that sensitises the trigeminovascular system, and abrupt changes in routine (such as sleeping in at weekends or skipping meals) are well-established precipitants. While these are not blood biomarkers, they interact directly with the nutritional and inflammatory markers that are measurable.
Standard GP investigation for migraine typically focuses on excluding serious pathology (via neurological examination or imaging if indicated) rather than identifying the nutritional and inflammatory contributors that may be driving attack frequency. Vitamin B12, vitamin D, ferritin, and inflammatory markers are not routinely checked in a migraine assessment, leaving a significant gap in understanding what is perpetuating the pattern.
For people with recurrent or chronic migraines, a comprehensive blood panel covering the key nutritional and inflammatory markers provides a practical starting point for identifying modifiable contributors. This is not a diagnostic test for migraine itself, but an assessment of the biological terrain in which migraines are occurring.
A note on magnesium testing: serum magnesium is not included in the Optimal Bloods panel as a standard marker (since serum levels can be misleading and do not reflect intracellular stores accurately). If you specifically want to assess magnesium status, a red blood cell magnesium test (RBC magnesium) is a more accurate measure and can be requested through your GP or a private laboratory. If your GP has already excluded other pathology and migraines persist at high frequency, neurologist referral is appropriate for assessment of preventative medication options.
A growing body of clinical evidence supports supplementing key nutritional deficiencies to reduce migraine frequency. Magnesium supplementation (typically 300 to 600 mg daily of a bioavailable form such as magnesium glycinate or citrate) is recommended by several headache societies as a preventive approach for people with frequent migraines. Riboflavin (vitamin B2) at 400 mg daily has evidence for migraine prevention in clinical trials by supporting mitochondrial energy production in neurons. CoQ10, which supports the same energy pathway, has similarly been shown to reduce migraine frequency in several controlled studies. B12 and vitamin D supplementation are indicated where deficiencies are confirmed. Testing these markers before supplementing gives you a clear baseline and lets you track whether the intervention is working for your individual biology.
Maintaining consistent sleep and wake times, even at weekends, is one of the most effective behavioural interventions for reducing migraine frequency. This matters at a neurological level: the brain's pain processing and inflammatory systems are both strongly regulated by circadian rhythms, and disruptions in timing, rather than just quantity, are sufficient to lower the migraine threshold. Prioritising seven to nine hours of sleep and avoiding abrupt schedule changes reduces the trigger burden on an already sensitive system.
Skipping meals and prolonged fasting are among the most consistently reported migraine triggers, driven by drops in blood glucose that stress the brain's energy supply. Eating at regular intervals and prioritising protein and healthy fats (which moderate blood sugar fluctuations compared to refined carbohydrates) creates a more stable neurological environment. Tracking HbA1c alongside migraine patterns can reveal whether suboptimal blood sugar regulation is a background contributor, particularly in people who report morning migraines or attacks that follow long gaps between meals.
Chronic stress increases cortisol output and sensitises the trigeminovascular system over time. Practices with evidence for cortisol modulation, including regular low-intensity exercise, structured relaxation, and sufficient recovery time, create measurable reductions in neurological sensitivity. The connection between stress and migraines is not simply behavioural: it is biochemical, running through the HPA axis and its influence on neurotransmitter balance, inflammatory signalling, and vascular tone. Addressing the physiological burden of chronic stress, rather than attempting to avoid individual stressors, provides a more durable foundation.
| Biomarker | What it measures | Why it matters | Relevance |
|---|---|---|---|
| Vitamin D Blood Test (25-OH) | 25-OH vitamin D status | Low vitamin D associated with more frequent attacks; required for magnesium absorption | 4 |
| Ferritin Blood Test | Iron storage levels | Iron deficiency can worsen migraine frequency and pain intensity; often missed by haemoglobin testing alone | 4 |
| hsCRP Blood Test (High Sensitivity C-Reactive Protein) | Systemic inflammation | Elevated CRP signals neuroinflammatory burden that lowers the migraine threshold | 4 |
| TSH Blood Test (Thyroid Stimulating Hormone) | Thyroid function | Thyroid dysregulation (both over and under) is associated with increased headache and migraine frequency | 3 |
| HbA1c Blood Test (Glycated Haemoglobin) | Average blood glucose over 2 to 3 months | Suboptimal blood sugar regulation is a background contributor to migraine in some people | 3 |
| LDL Cholesterol Blood Test | Low-density lipoprotein | Cardiovascular risk markers help contextualise vascular migraine mechanisms, particularly in older adults | 2 |
| Magnesium Blood Test | Intracellular magnesium stores | The most consistently studied nutritional trigger for migraines; serum levels can appear normal even when depleted | 5 |
Can nutritional deficiencies cause migraines?
Nutritional deficiencies do not directly cause migraines in the same way that, for example, a virus causes an infection. Instead, they lower the biological threshold at which a migraine attack occurs. The nervous system is energetically demanding and sensitive to changes in its biochemical environment. Deficiencies in magnesium, vitamin B12, vitamin D, riboflavin, and CoQ10 have each been studied in relation to migraine frequency, and evidence supports addressing these deficiencies as part of a preventive approach. This is distinct from treating migraine as a nutritional deficiency disease. Rather, it means identifying whether your migraine biology is being made worse by gaps in the nutrients your nervous system needs to function at its most resilient.
Can low magnesium trigger migraines?
Low magnesium is one of the most consistently replicated nutritional findings in migraine research. Up to 50% of people experiencing migraines have low levels of magnesium during an attack, and interictal magnesium levels (between attacks) are also lower in people with migraines compared to healthy controls. Magnesium is involved in regulating cortical spreading depression (the wave of neuronal activity that triggers many migraines), NMDA receptor activity (involved in pain sensitisation), and blood vessel tone. Magnesium supplementation is recommended by several headache medicine organisations as a preventive strategy for people with frequent migraines, particularly those with menstrual migraines or migraine with aura.
Is there a blood test that can identify migraine triggers?
There is no single blood test that diagnoses or predicts migraines, since migraine is a neurological condition with many interacting triggers. However, comprehensive blood testing can identify the nutritional deficiencies and inflammatory patterns that are known to lower the migraine threshold. Testing B12, vitamin D, ferritin, CRP, homocysteine, and thyroid function gives a practical view of the modifiable biological factors that may be contributing to your attack frequency. This is most useful when results are interpreted alongside a symptom diary and, ideally, a consultation with a practitioner who understands both the nutritional and neurological dimensions of migraine.
What is the link between vitamin B12 and migraine?
Vitamin B12 is involved in two biological pathways that are directly relevant to migraine. First, B12 is required to metabolise homocysteine: without adequate B12, homocysteine accumulates in the blood, which increases nitric oxide production and can trigger vasodilatation and neuroinflammation in the brain. Second, B12 supports myelin integrity in the nervous system, and B12 deficiency is associated with heightened neurological sensitivity. Research has found that people with migraines have significantly lower B12 levels than those without, and that those in the highest B12 quartile had around 80% lower odds of having migraine compared to those in the lowest quartile. Checking B12 and homocysteine together provides a picture of both status and functional impact.
Why do migraines get worse around menstruation?
Menstrual migraines are driven by the sharp drop in oestrogen that occurs in the days before menstruation. Oestrogen influences neurotransmitter activity (particularly serotonin) and the sensitivity of the trigeminovascular pain pathway: when it falls rapidly, the pain threshold drops and the threshold for a migraine attack falls with it. This pattern is not psychological; it is a physiological response to hormonal withdrawal at a brain level. Women with menstrual migraines often report that attacks are more severe and less responsive to standard pain relief than attacks at other points in the cycle. Managing the nutritional contributors (particularly magnesium, which has specific evidence for menstrual migraine prevention) can help raise the threshold even when the hormonal trigger cannot be removed.
Can vitamin D deficiency cause migraines?
Vitamin D deficiency alone does not cause migraines, but it is associated with higher migraine frequency in multiple studies. Vitamin D has anti-inflammatory effects and plays a role in regulating immune function and neurological sensitivity. Its relevance to migraines likely operates through several pathways: direct effects on the brain via vitamin D receptors in the hypothalamus, indirect effects via its role in magnesium absorption (vitamin D deficiency can compound magnesium depletion), and anti-inflammatory effects that may reduce neuroinflammatory burden. Vitamin D deficiency is common in the UK population, particularly in winter months and in people with limited sun exposure. Testing is the only reliable way to establish your actual status, since symptoms of deficiency are non-specific.
Can thyroid problems cause migraines or make them worse?
Both hypothyroidism (underactive thyroid) and hyperthyroidism (overactive thyroid) are associated with increased headache and migraine frequency. Thyroid hormone affects blood vessel tone, neurotransmitter metabolism, and the body's overall inflammatory state, all of which influence migraine pathophysiology. Subclinical hypothyroidism (where TSH is elevated but Free T4 is still in range) can produce migraines alongside fatigue, brain fog, and mood changes without being obvious on a basic TSH screen. Including Free T3 alongside TSH in a thyroid assessment gives a more complete picture of whether thyroid function is contributing to a migraine pattern that has not responded to standard nutritional interventions.
What lifestyle changes have the strongest evidence for reducing migraine frequency?
The lifestyle changes with the best evidence for migraine prevention include: maintaining consistent sleep and wake times (irregular sleep is among the most reliably reported triggers), eating at regular intervals and avoiding long gaps between meals (blood glucose drops trigger attacks in many people), managing chronic stress through structured recovery practices, and regular moderate exercise (which reduces neuroinflammation and improves HPA axis regulation over time). Reducing alcohol, particularly red wine and beer which contain histamine and tyramine, is relevant for people who identify these as triggers. Identifying your specific triggers through a symptom diary and testing the nutritional contributors to your pattern is more useful than applying generic advice that may not apply to your biology.
What is the connection between migraines and inflammation?
Inflammation plays a central role in migraine pathophysiology, particularly at the level of the trigeminovascular system: the pain network involving the trigeminal nerve and the blood vessels of the meninges. During a migraine attack, inflammatory neuropeptides (particularly CGRP) are released, triggering the cascade of pain, nausea, and sensory sensitivity that defines the experience. Between attacks, people with chronic migraine tend to have higher levels of systemic inflammatory markers (including CRP) compared to those without. This systemic inflammatory burden, driven by diet, stress, sleep, and metabolic factors, does not cause migraines but lowers the threshold at which an attack is triggered. Addressing the inflammatory contributors through nutrition, sleep, and lifestyle creates a more resilient neurological environment.