Short answer: Diet can trigger migraine attacks in some people and may help prevent them. Skipping meals and alcohol are the most commonly reported triggers. In trials, magnesium and riboflavin reduced attacks, and a diet higher in omega-3s cut headache days. Eat regular meals, keep caffeine steady, and use a diary to find your own triggers.

Some foods and eating habits can trigger migraine attacks, and a few dietary changes may help prevent them, but triggers differ a lot from person to person. The evidence is moderate. The best-supported protective steps are magnesium and riboflavin supplements (each with positive trials) and eating more omega-3 fat from fish (one larger trial). Several well-known trigger foods have weak controlled evidence.

Diet is not a substitute for the treatment your doctor prescribes. Don’t stop or reduce prescribed migraine medication without talking to your doctor. Supplement doses used in trials can exceed upper limits or interact with medicines, so check with a doctor or pharmacist first.

What to do first

  1. Eat regular meals. Skipping meals is one of the most commonly reported triggers.
  2. Keep caffeine low and steady from day to day. Healthy adults should stay below about 400 mg a day (200 mg in pregnancy).
  3. Drink enough fluids through the day.
  4. Eat fatty fish two to three times a week and cut back on processed foods heavy in seed oils, as in the Ramsden trial.
  5. Ask your doctor about magnesium, riboflavin or CoQ10. See the doses and cautions below.
  6. Keep a food and headache diary for at least eight weeks. Record foods, meal times, fluids, sleep, stress, weather and menstrual cycle. Note when each headache starts, how long it lasts and how bad it is. Patterns often show only after several weeks.
  7. If you suspect food triggers, try a structured elimination diet with your doctor or dietitian.

Which foods trigger migraine?

Migraine affects about one billion people worldwide and is the second leading cause of years lived with disability (Steiner 2020). Women are affected more often than men. In a clinic survey of 1,207 patients (Kelman 2007), 27 percent reported food-related triggers.

TriggerHow often reportedStrength of evidence
Skipping meals57% of patients (Kelman 2007)Commonly reported; no controlled trials
Alcohol38% (Kelman 2007)Mostly an occasional trigger
Caffeine withdrawalCommonQuestionnaire evidence
Tyramine (aged cheese, cured meat)Common beliefWeak; a controlled study found no effect
Histamine (wine, fermented foods)Some peoplePlausible; not tested in controlled trials
Nitrates in processed meatSome peopleCase reports and lab findings
MSGCommon beliefNot supported at typical doses
ChocolateOften self-reportedA controlled study found no effect

Skipping meals and fasting

In Kelman’s survey, 57 percent of people with migraine named not eating as a trigger. Skipping meals, religious fasting and long gaps between meals (more than five to six hours while awake) can all provoke attacks. Low blood sugar has been proposed as the reason, through stress hormones and reduced energy supply to brain cells.

To keep blood sugar steady, eat regular meals and don’t skip breakfast. Combine protein and fat with carbohydrates, and favor vegetables, legumes and whole grains. Avoid sugary drinks on an empty stomach, and carry a protein-rich snack for days when meals may be late.

If you practice intermittent fasting and get migraines, the fasting may be contributing. Fasting is also risky for people taking insulin, sulfonylureas or SGLT2 inhibitors without medical advice.

Alcohol

In the same survey, 38 percent named alcohol. Alcohol widens blood vessels, increases histamine release, promotes dehydration and disrupts sleep. A review (Panconesi 2008) found that about one-third of migraine patients in retrospective studies reported alcohol as an occasional trigger, but only about 10 percent as a frequent one. Prospective studies found alcohol a less important trigger.

Some studies point to red wine and others to white wine or other drinks, so which component is responsible is uncertain.

Caffeine withdrawal

Caffeine can ease a headache in the short term, which is why it is in many over-the-counter headache pills. But regular use leads to dependence, and even a modest delay in your usual dose can trigger a withdrawal headache.

In a questionnaire study of 151 headache clinic patients (Couturier 1992), weekend headaches were strongly linked to high daily caffeine intake combined with sleeping late. Many headache specialists advise keeping caffeine low and consistent from day to day.

Tyramine

Tyramine forms when protein-rich foods age, ferment or spoil. Aged cheeses (cheddar, Stilton, Brie, Camembert), cured meats (salami, pepperoni, chorizo), soy sauce, miso and draft beer contain the most.

Hanington 1967 proposed tyramine as a migraine trigger. But in a double-blind study of 25 patients (Moffett 1972), tyramine capsules were not clearly linked to headache, even in people who reported food-triggered migraine. Individual sensitivity may vary, but controlled evidence for tyramine is weak.

Histamine

Histamine is found in fermented foods, aged cheeses, wine (especially red), smoked fish, sauerkraut and vinegar-based products. A review (Maintz & Novak 2007) described histamine intolerance. When the gut enzyme that breaks down histamine (diamine oxidase, or DAO) works poorly, histamine-rich foods can cause headache, gut symptoms, flushing and nasal congestion. Genes, gut inflammation, alcohol and some medications can reduce DAO activity.

This suggests your overall histamine load, not any single food, may decide whether a meal triggers an attack. That could explain why the same glass of red wine triggers a migraine one week and not the next, though the idea has not been tested in controlled trials.

Nitrates in processed meat

Bacon, hot dogs, deli meats and sausages contain nitrate and nitrite preservatives. The body converts them to nitric oxide, which widens blood vessels and may trigger migraine. The “hot dog headache” was first described by Henderson & Raskin 1972. In an analysis of mouth bacteria (Gonzalez 2016), people with migraine had more bacterial genes for processing nitrates than people without, a possible reason some people are more susceptible.

MSG

The evidence does not support MSG as a reliable migraine trigger at typical doses. A review (Freeman 2006) concluded that clinical trials have not found a consistent link between MSG and headache, and placebo-controlled trials have not shown an MSG-sensitive subgroup. Glutamate is also abundant in tomatoes, parmesan and mushrooms.

Some people do report attacks after MSG-heavy meals; whether that is MSG, something else in the meal or expectation is unclear. Test it yourself rather than avoiding it on principle.

Which supplements help prevent migraine?

SupplementDose used in trialsBest evidenceGuideline ratingCautions
Magnesium400–600 mg a day41.6% fewer attacks vs 15.8% with placebo (Peikert 1996); other trials mixedProbably effective (Level B)Above the 350 mg supplement upper limit; diarrhea; avoid with kidney disease unless your doctor advises
Riboflavin (vitamin B2)400 mg a day59% halved headache days vs 15% with placebo (Schoenen 1998)Probably effective (Level B)Harmless bright yellow urine
CoQ10100–300 mg a dayFewer attacks in one adult trial; no effect in childrenPossibly effective (Level C)May reduce the effect of warfarin

Magnesium

Magnesium is one of the better-studied supplements for migraine prevention. One review (Mauskop & Varughese 2012) suggested deficiency may be present in up to half of people with migraine, and noted that placebo-controlled trials have produced mixed results. In one positive trial (Peikert 1996), 81 patients took 600 mg of magnesium a day or placebo for 12 weeks.

Attack frequency fell by 41.6 percent with magnesium and by 15.8 percent with placebo, and 18.6 percent of the magnesium group had diarrhea.

The American Academy of Neurology and the American Headache Society rate magnesium “probably effective” (Level B; Holland 2012). Food sources include pumpkin seeds, almonds, spinach, black beans, dark chocolate and avocados.

Trial doses are above the upper limit for magnesium from supplements, which is 350 mg a day for adults, and higher doses commonly cause diarrhea. Take doses above the upper limit only under medical supervision. Avoid magnesium supplements if you have kidney disease unless your doctor advises them. More in our guide to magnesium and the brain.

Riboflavin

Schoenen 1998 gave 55 patients 400 mg of riboflavin a day or placebo for three months. Headache days halved in 59 percent of the riboflavin group, compared with 15 percent on placebo.

Riboflavin may help brain cells make energy. Side effects are minimal: excess leaves in the urine, which turns bright yellow but is harmless. The same guidelines rate riboflavin “probably effective” (Level B). The dose is far above what food can supply, so a supplement is the only practical route.

Coenzyme Q10

Sándor 2005 gave 42 patients 100 mg of CoQ10 three times a day or placebo. By the third month, CoQ10 reduced attack frequency, headache days and days with nausea. A later crossover trial in 120 children and adolescents (Slater 2011) found no difference between CoQ10 and placebo; both groups improved.

The American Academy of Neurology rates CoQ10 “possibly effective” (Level C). It is usually well tolerated, with occasional mild stomach upset. CoQ10 may reduce the effect of warfarin, so ask a doctor or pharmacist before taking it, especially if you take other medicines.

Trials of all three supplements assessed effects after about three months.

Omega-3s from food

The strongest diet evidence comes from a trial of 182 adults (Ramsden 2021). Over 16 weeks, a diet providing 1.5 g a day of EPA and DHA reduced headache hours and headache days per month compared with a control diet. One version also lowered omega-6 linoleic acid, and this combined diet cut headache days by 4 a month.

The main quality-of-life outcome (the HIT-6 questionnaire) did not improve significantly, and the diets did not change the classic migraine signals CGRP and prostaglandin E2. The 2012 guideline had judged earlier evidence on omega-3 supplements conflicting or inadequate.

The Ramsden trial used food, not supplements. In practice, that means fatty fish (salmon, mackerel, sardines, anchovies, herring) two to three times a week and fewer processed foods heavy in seed oils. See our omega-3 guide for sources.

Fish oil supplements can increase bleeding risk with anticoagulant or antiplatelet drugs. In trials, doses above about 1 g a day have been linked to a higher risk of atrial fibrillation, so ask a doctor or pharmacist first.

Fluids

Dehydration is a commonly reported trigger, though controlled evidence is limited. Spigt 2012 ran a trial in 102 people with recurrent headaches who drank little. Asking them to drink an extra 1.5 liters of water a day improved migraine-specific quality of life. The number of days with at least moderate headache did not change much.

Drinking enough through the day, more in heat or with exercise, is sensible. If you have a heart or kidney condition and have been told to limit fluids, follow your doctor’s advice.

A Mediterranean-style diet

Arab 2023 ran a cross-sectional study of 262 adults with migraine in Iran. Those with the highest Mediterranean diet scores had lower headache disability scores and shorter headaches, with a trend toward fewer headaches. A cross-sectional study cannot show cause and effect.

The diet is high in magnesium and omega-3s and low in processed meats and additives, so it also limits many commonly reported triggers. The Mediterranean diet guide has more detail.

Finding your own triggers

A food that triggers migraine in one person can be harmless for another. Genes, gut bacteria, hormones and conditions such as histamine intolerance or celiac disease all play a part.

A review (Martin & Vij 2016) argued that teaching patients to find their own triggers works better than handing them a long list of foods to avoid. Long lists lead to needless restriction, poorer nutrition and food anxiety, and often miss the real trigger.

How an elimination diet works

An elimination diet removes many foods, so keep it short and plan it with a doctor or dietitian. Children should only follow one under medical supervision to avoid nutritional deficiency.

  • Restriction (four to six weeks): Remove all commonly reported triggers at once: aged cheeses, cured and processed meats, fermented foods, alcohol, chocolate, citrus fruits, nuts, artificial sweeteners (especially aspartame) and caffeine. Taper caffeine slowly to avoid a withdrawal headache.
  • Reintroduction: Add foods back one at a time, every three to four days, while keeping a detailed headache diary.

Common mistakes are missing hidden sources in processed foods, stopping before the four-week minimum, ignoring non-food triggers such as stress, sleep and hormones, and adding back several foods at once.

The evidence for elimination

In a double-blind crossover trial of 30 people with migraine (Alpay 2010), elimination diets guided by IgG antibody tests led to fewer headache days and attacks than at baseline. Allergy societies do not recommend IgG food testing, and this small trial does not establish it.

It is weak support for the idea that personal elimination may help some people. Elimination guided by your own symptoms avoids the cost of testing but has not been tested in controlled trials.

Frequently Asked Questions

How long until diet changes help?

Steadier meals and better hydration may help within days to weeks. Magnesium, riboflavin and CoQ10 trials measured effects after about three months. Elimination effects show during the four-to-six-week restriction phase. A change in overall diet pattern builds over months.

Is chocolate really a migraine trigger?

The evidence is weak. In a double-blind study of 63 women with chronic headache (Marcus 1997), chocolate was no more likely than carob to provoke headache. This held even in women who believed chocolate was a trigger. One possibility is that craving chocolate is an early sign of an attack that has already begun. Individual sensitivity can’t be ruled out, so test it with elimination and reintroduction.

Should I follow a low-histamine diet?

It may help if your migraines follow wine, aged cheese or fermented foods and come with flushing, nasal congestion or gut symptoms. DAO enzyme testing is not fully validated, and DAO supplements have little trial evidence. A short, supervised trial of a low-histamine diet may be worth discussing with your doctor. Avoiding histamine is needlessly restrictive if your triggers lie elsewhere.

Sources

  • Steiner, T. J., Stovner, L. J., Jensen, R., Uluduz, D., & Katsarava, Z. (2020). Migraine remains second among the world’s causes of disability, and first among young women: findings from GBD2019. Journal of Headache and Pain, 21(1), 137. doi:10.1186/s10194-020-01208-0

  • Holland, S., Silberstein, S. D., Freitag, F., Dodick, D. W., Argoff, C., & Ashman, E. (2012). Evidence-based guideline update: NSAIDs and other complementary treatments for episodic migraine prevention in adults. Neurology, 78(17), 1346-1353. doi:10.1212/WNL.0b013e3182535d0c

  • Mauskop, A., & Varughese, J. (2012). Why all migraine patients should be treated with magnesium. Journal of Neural Transmission, 119(5), 575-579. doi:10.1007/s00702-012-0790-2

  • Peikert, A., Wilimzig, C., & Köhne-Volland, R. (1996). Prophylaxis of migraine with oral magnesium: results from a prospective, multi-center, placebo-controlled and double-blind randomized study. Cephalalgia, 16(4), 257-263. doi:10.1046/j.1468-2982.1996.1604257.x

  • Schoenen, J., Jacquy, J., & Lenaerts, M. (1998). Effectiveness of high-dose riboflavin in migraine prophylaxis: a randomized controlled trial. Neurology, 50(2), 466-470. doi:10.1212/wnl.50.2.466

  • Sándor, P. S., Di Clemente, L., Coppola, G., Saenger, U., Fumal, A., Magis, D., Seidel, L., Agosti, R. M., & Schoenen, J. (2005). Efficacy of coenzyme Q10 in migraine prophylaxis: a randomized controlled trial. Neurology, 64(4), 713-715. doi:10.1212/01.WNL.0000151975.03598.ED

  • Slater, S. K., Nelson, T. D., Kabbouche, M. A., et al. (2011). A randomized, double-blinded, placebo-controlled, crossover, add-on study of CoEnzyme Q10 in the prevention of pediatric and adolescent migraine. Cephalalgia, 31(8), 897-905. doi:10.1177/0333102411406755

  • Ramsden, C. E., Zamora, D., Faurot, K. R., et al. (2021). Dietary alteration of n-3 and n-6 fatty acids for headache reduction in adults with migraine: randomized controlled trial. BMJ, 374, n1448. doi:10.1136/bmj.n1448

  • Maintz, L., & Novak, N. (2007). Histamine and histamine intolerance. American Journal of Clinical Nutrition, 85(5), 1185-1196. doi:10.1093/ajcn/85.5.1185

  • Gonzalez, A., Hyde, E., Sangwan, N., Gilbert, J. A., Viirre, E., & Knight, R. (2016). Migraines are correlated with higher levels of nitrate-, nitrite-, and nitric oxide-reducing oral microbes in the American Gut Project cohort. mSystems, 1(5), e00105-16. doi:10.1128/mSystems.00105-16

  • Panconesi, A. (2008). Alcohol and migraine: trigger factor, consumption, mechanisms. A review. Journal of Headache and Pain, 9(1), 19-27. doi:10.1007/s10194-008-0006-1

  • Alpay, K., Ertas, M., Orhan, E. K., Ustay, D. K., Lieners, C., & Baykan, B. (2010). Diet restriction in migraine, based on IgG against foods: a clinical double-blind, randomised, cross-over trial. Cephalalgia, 30(7), 829-837. doi:10.1177/0333102410361404

  • Arab, A., Khorvash, F., Karimi, E., Hadi, A., & Askari, G. (2023). Associations between adherence to Mediterranean dietary pattern and frequency, duration, and severity of migraine headache: A cross-sectional study. Nutritional Neuroscience, 26(1), 1-10. doi:10.1080/1028415X.2021.2009162

  • Martin, V. T., & Vij, B. (2016). Diet and headache: Part 2. Headache, 56(9), 1553-1562. doi:10.1111/head.12952

  • Spigt, M., Weerkamp, N., Troost, J., van Schayck, C. P., & Knottnerus, J. A. (2012). A randomized trial on the effects of regular water intake in patients with recurrent headaches. Family Practice, 29(4), 370-375. doi:10.1093/fampra/cmr112

  • Marcus, D. A., Scharff, L., Turk, D., & Gourley, L. M. (1997). A double-blind provocative study of chocolate as a trigger of headache. Cephalalgia, 17(8), 855-862. doi:10.1046/j.1468-2982.1997.1708855.x

  • Kelman, L. (2007). The triggers or precipitants of the acute migraine attack. Cephalalgia, 27(5), 394-402. doi:10.1111/j.1468-2982.2007.01303.x

  • Freeman, M. (2006). Reconsidering the effects of monosodium glutamate: a literature review. Journal of the American Academy of Nurse Practitioners, 18(10), 482-486. doi:10.1111/j.1745-7599.2006.00160.x

  • Couturier, E. G., Hering, R., & Steiner, T. J. (1992). Weekend attacks in migraine patients: caused by caffeine withdrawal? Cephalalgia, 12(2), 99-100. doi:10.1046/j.1468-2982.1992.1202099.x

  • Moffett, A., Swash, M., & Scott, D. F. (1972). Effect of tyramine in migraine: a double-blind study. Journal of Neurology, Neurosurgery and Psychiatry, 35(4), 496-499. doi:10.1136/jnnp.35.4.496

  • Hanington, E. (1967). Preliminary report on tyramine headache. British Medical Journal, 2(5551), 550-551. doi:10.1136/bmj.2.5551.550

  • Henderson, W. R., & Raskin, N. H. (1972). “Hot-dog” headache: individual susceptibility to nitrite. The Lancet, 2(7788), 1162-1163. doi:10.1016/s0140-6736(72)92591-3