- Menu

Site navigation

27 May, 2026
15min read

Migraine and Diet: Foods That Trigger Attacks and What Actually Helps

Migraine and Diet: Foods That Trigger Attacks and What Actually Helps

Migraine isn’t just a “bad headache.” It’s a complex neurological event — your blood vessels, the trigeminal nerve system (your face and head’s main “pain highway”), and signaling molecules like serotonin and CGRP (calcitonin gene-related peptide, a protein that powerfully dilates brain blood vessels) all get pulled into the storm.

According to the World Health Organization (WHO), migraine ranks among the top 10 causes of disability worldwide. About 14–15% of adults live with it — that’s roughly 1 in 7 people, or nearly 39 million Americans, with women of reproductive age affected most.

Food influences migraine through three main pathways:

  1. Direct triggers. Certain compounds in foods can directly spark inflammation in nerve cells — the classic “trigger” effect.
  2. Nutrient gaps. Shortages of key vitamins and minerals leave your brain more sensitive to any stimulus — like an amplifier turned up to maximum.
  3. Blood sugar swings. Irregular eating causes spikes and crashes that can ignite an attack on their own.

Below, we’ll cover what the clinical research actually shows works, which foods to consider limiting, how to build your plate, and when diet alone won’t cut it.


Core Principles of a Migraine-Friendly Diet

Eat regularly — the foundation of everything

Skipping a meal or going more than 4–5 hours without eating drops your blood sugar — and for many people with migraine, that’s a direct fuse to an attack. Studies published in Headache and Cephalalgia found that people who regularly skip breakfast have attacks 25–40% more often (in those with episodic migraine — attacks occurring occasionally rather than daily).

Practical rule: 3 main meals plus 1–2 snacks per day, with 3–4 hours between them. Eat breakfast within an hour of waking. If you practice intermittent fasting (IF) and notice your attacks getting worse, that’s a clear signal to drop the protocol.

Stay consistently hydrated

Dehydration is one of the most common — and most underestimated — migraine triggers. Many people simply don’t realize how little they’re drinking. The American Migraine Foundation warns that losing just 1–2% of body weight in fluids is enough to trigger an attack — for a 155-pound (70 kg) person, that’s about 24–47 fl oz, or just 3–5 glasses of water you didn’t drink today.

Target: Roughly 0.5 fl oz of water per pound of body weight per day (about 30–35 ml/kg). For a 130-pound person, that’s about 65 fl oz (8 cups); for a 175-pound person, about 88 fl oz (11 cups) — assuming you don’t have heart or kidney issues. In hot weather, during exercise, or while breastfeeding, drink more. Coffee and tea count toward fluids, but they don’t replace plain water.

Balance your fats — favor omega-3s

In 2021, BMJ published a landmark study: participants who ate more omega-3s (fatty fish, flaxseed) and less omega-6 (sunflower, corn, and soybean oils) had 30–40% fewer migraine hours per month after just 4 months. In plain English: these two fat families compete in your body, and when omega-3 wins, inflammation calms down. This study has become foundational to the modern conversation about diet and migraine.

In practice: 2–3 servings of fatty fish per week (sardines, mackerel, salmon), extra-virgin olive oil as your main cooking fat, and minimal fried foods or processed sauces.

Avoid triggers — but make it personal

Classic “foods to avoid with migraine” lists run 30 or 40 items long. The problem? Only 2–4 of those are actually relevant to you. The rule isn’t to cut everything at once (that’s a fast track to nutrient deficiency and disordered eating) — it’s to keep a food and headache diary for at least 6–8 weeks, then work with your doctor to identify your real, personal triggers.

Hit your magnesium and riboflavin targets

The two supplements with the strongest evidence for migraine prevention are magnesium (300–600 mg/day) and vitamin B2/riboflavin (400 mg/day). Heads up: 400 mg of B2 is more than 300 times the daily food intake — that’s a therapeutic dose, not a casual “vitamin boost.”

Both the American Academy of Neurology (AAN) and the American Headache Society (AHS) rate these as “probably effective” (Level B evidence — strong enough to recommend, though not on the level of established prescription preventives).


Foods to Eat: Building Your Migraine-Friendly Plate

Food groupExamplesWhy it helpsServing
Leafy greensSpinach, Swiss chard, arugula, broccoliMagnesium and folate1–2 servings/day
Fatty fishSalmon, sardines, mackerel, herringOmega-3s, vitamin D2–3 servings/week
Whole grainsOats, buckwheat, quinoa, brown riceStable glucose, magnesium, B vitamins1 serving with main meals
LegumesLentils, chickpeas, black beans, mung beansMagnesium, plant protein, slow carbs3–4 times/week
Nuts and seedsAlmonds, pumpkin seeds, flaxseed, chiaMagnesium, omega-3s, B21 oz/day
Fresh fruit (most)Apples, pears, berries, bananas, grapesAntioxidants, water, potassium2–3 servings/day
Fresh (un-aged) cheeseMozzarella, ricotta, mascarponeProtein without excess tyramine2–3 oz
Fresh meatChicken, turkey, lean beef, pork tenderloinQuality protein, B12, iron3.5–5 oz per serving
EggsWhole eggs, including yolksCholine, B2, complete protein1–2/day
Herbal teasPeppermint, chamomile, gingerCaffeine-free hydrationNo strict limit

Foods That May Trigger Migraine Attacks

Food/categoryWhy it mattersRecommendationBetter alternative
Aged cheeses (parmesan, cheddar, blue, brie, camembert)High in tyramine — a compound formed during cheese aging that makes blood vessels constrict and then sharply dilate (which your head feels as throbbing pain)⚠️ Limit and monitorMozzarella, ricotta, fresh feta
Processed meats (sausages, hot dogs, bacon, deli ham, lunch meats)Nitrates and nitrites — the preservatives that give cured meats their pink color — convert in the body into compounds that sharply dilate blood vessels❌ Cut out or eat rarelyFresh or home-roasted meats
Alcohol (especially red wine, beer, sparkling wine)Tyramines, histamine, dehydration, and direct vascular effects❌ Eliminate if attacks are frequent; ⚠️ limit if rareSparkling water with lime, non-alcoholic beer (hop-free)
Aspartame and other artificial sweeteners (in diet sodas)Breakdown products interfere with brain neurotransmitters that govern mood and pain sensitivity⚠️ Avoid, especially “diet” drinksStevia, erythritol, or unsweetened drinks
MSG (monosodium glutamate) — fast food, chips, instant soups, bouillon cubesDirectly stimulates NMDA receptors — specialized “antennas” on nerve cells that pick up pain signals⚠️ Read labels, limitHomemade seasonings, sea salt, herbs and spices
Caffeine over 200 mg/day (≈2 cups of coffee)Both excess and sudden withdrawal trigger attacks⚠️ Keep a steady moderate doseTaper gradually, switch to peppermint tea
Chocolate (especially dark)Phenylethylamine and theobromine — triggers for some people⚠️ Monitor individuallyCoconut flakes, fruit-and-nut bars
Citrus (for some patients)Octopamine, synephrine⚠️ MonitorBerries, apples
Raw onion and garlic in large amountsSulfur compounds⚠️ MonitorCooked or roasted onion
Fermented and pickled foods (kimchi, commercial sauerkraut, soy sauce)Histamine, tyramines⚠️ LimitFresh vegetables, quick refrigerator pickles

⚠️ Strict elimination is only justified once your personal headache journal confirms a connection. Don’t cut everything at once — that’s a fast track to anxious eating and real nutrient deficiencies.


What the Research Actually Shows

Magnesium — the most-studied migraine nutrient

A 2018 meta-analysis of 21 studies (the most reliable form of scientific evidence, published in Headache) found that magnesium at 300–600 mg/day reduced attack frequency by 22–43% in people with episodic migraine. The benefit was greatest in those whose blood work showed magnesium deficiency — which affects about half of all migraine patients (2–3 times more common than in people without migraine).

The Canadian Headache Society includes magnesium in its official migraine prevention guidelines, and the AHS lists it among evidence-based options. The best-absorbed forms are magnesium citrate, glycinate, and malate. The worst? Magnesium oxide — your body barely absorbs it, but your gut definitely notices (hence the diarrhea at preventive doses).

Riboflavin (vitamin B2)

The landmark Schoenen et al. study (1998, Neurology) found that 400 mg of riboflavin per day for 3 months cut attack frequency in half for more than a third of patients. Subsequent research has confirmed the effect.

How it works: Riboflavin “recharges” mitochondria — the tiny power plants inside your nerve cells. When brain cells have enough energy, they’re less prone to firing off into a migraine attack. Because this dose is far above the physiological norm (1.1–1.3 mg/day), it should only be taken under medical supervision.

Coenzyme Q10 (CoQ10)

A 2005 Neurology study by Sandor et al. found that 300 mg of CoQ10 per day reduced attack frequency by 27% compared with placebo. Don’t expect overnight results: CoQ10 is a “cumulative” supplement — first effects show up only after 1–3 months of consistent use. CoQ10 appears in AAN/AHS guidelines as “possibly effective” (Level C–B evidence).

Omega-3 fatty acids

The Ramsden et al. study (BMJ, 2021) confirmed it: when omega-3s from fish (specifically EPA and DHA — the two most beneficial types, abundant in salmon and sardines) go up and omega-6s from seed oils go down, headaches become both shorter and less frequent. This is one of the strongest dietary interventions with statistically significant results.

The ketogenic diet

Individual studies (Di Lorenzo et al., 2015 and 2019) document 50–80% reductions in attack frequency on a ketogenic diet. However, sample sizes were small, the diet is highly restrictive, and there are serious contraindications: kidney or liver disease, pregnancy. Keto isn’t yet in standard migraine guidelines but is actively under study. Don’t start it solo — work with a physician and registered dietitian.

The Mediterranean diet

Multiple long-term studies (including a 2022 paper in Nutrients) found a clear pattern: the more closely people followed a Mediterranean eating pattern — vegetables, fish, olive oil, legumes, whole grains, minimal meat and sweets — the less often they had migraine attacks. The Mediterranean diet is currently considered the safest, most evidence-supported “default” option for most patients.

⚠️ No diet “cures” migraine. The goal is reducing attack frequency and intensity — which can dramatically improve quality of life — but it doesn’t replace neurologist-prescribed treatment.


Daily Targets for Key Migraine-Fighting Nutrients

NutrientAdult woman (RDA)Migraine prevention (adult)Upper limit (UL)Source
Magnesium320 mg300–600 mg (with supplement)350 mg from supplements (NIH)NIH ODS
Riboflavin (B2)1.1 mg400 mg (therapeutic — with provider only)No UL establishedNIH ODS
Coenzyme Q10Not established100–300 mgUp to 1,200 mg well-toleratedAAN
Omega-3 (EPA+DHA)250 mg1,000–2,000 mgUp to 3,000 mg safeFDA, AHA
Vitamin D600 IU1,000–2,000 IU (based on blood levels)4,000 IUNIH ODS
Water~64 fl oz (8 cups)30–35 ml/kg body weightIndividualNIH, IOM

⚠️ Therapeutic supplement doses — especially riboflavin and magnesium above 350 mg — aren’t casual vitamins. Have them prescribed by your neurologist or primary care provider, ideally after blood work for magnesium and vitamin D levels.


Sample 1-Day Migraine-Friendly Meal Plan

This is a sample built on Mediterranean principles, with an emphasis on magnesium, B2, and omega-3 sources. Total calories: roughly 1,900–2,100 — suitable for a moderately active adult of average build.

MealTimeExampleNotes
Breakfast7:30–8:30 a.m.Oatmeal cooked in milk with a sliced banana, slivered almonds, and a tablespoon of ground flaxseed. Peppermint tea, unsweetened.Magnesium + B2 + omega-3 from flax. Skip coffee on an empty stomach.
Snack11:00 a.m.A small handful (1 oz) of mixed nuts (almonds, walnuts) + an appleStable glucose, magnesium
Lunch1:00–2:00 p.m.Baked salmon (5 oz), quinoa (½ cup cooked), salad of spinach, cucumber, and avocado with extra-virgin olive oilOmega-3, magnesium, folate
Snack4:30 p.m.2 whole-grain or buckwheat crackers + 2 oz fresh mozzarella + sliced tomatoFresh cheese, no tyramine
Dinner7:00 p.m.Lentil soup (¾ cup), steamed broccoli, hard-boiled eggMagnesium, plant protein, slow satiety
Optional bedtime9:00 p.m.Warm milk with honey OR chamomile teaTryptophan, evening calm

Hydration: 8 cups (64 fl oz) of plain water spread throughout the day — first glass within 30 minutes of waking.

⚠️ This is a template, not a prescription. Calories and exact composition depend on your weight, activity level, age, comorbidities, and personal triggers. A registered dietitian can build an individualized plan.


Who Needs to Pay Extra Attention to Diet

Women with menstrual migraine

Menstrual migraine — attacks tied to the menstrual cycle — affects up to 60% of women with migraine. The cause: estrogen levels drop sharply before menstruation, which triggers the attack. Regular meals, additional magnesium (300–400 mg/day for 7–10 days before menstruation), and consistent sleep during this window meaningfully reduce attack risk. Some neurologists recommend avoiding alcohol entirely during this period. Frovatriptan is one FDA-approved option for short-term preventive use around menstruation — discuss with your provider.

People with frequent attacks (more than 4 per month)

If you’re getting more than 4 attacks per month, or if your headache occupies more than half of all days each month (that’s “chronic migraine”), diet alone won’t be enough — you’ll need preventive medication. Options include beta-blockers (commonly known as blood pressure medications), topiramate (Topamax), and the newer CGRP-blocking medications (like Aimovig, Ajovy, and Emgality — FDA-approved monoclonal antibodies that target the protein driving the pain). Diet complements treatment but doesn’t replace it.

Patients with both migraine and IBS (irritable bowel syndrome)

Your gut and brain are in constant conversation via nerves and hormones — researchers call this the gut–brain axis. Problems in one system show up in the other. Patients with both conditions often benefit from the low-FODMAP diet — a protocol that temporarily removes specific types of sugars and fibers (found in onions, garlic, legumes, and certain fruits) that ferment in the gut. Bloating decreases — and, as a bonus, so do headaches. This diet should only be prescribed by a gastroenterologist or RD; the strict elimination phase lasts 4–6 weeks.

Children and teens with migraine

Kids and adolescents are especially sensitive to skipped meals, sleep deprivation, and dehydration. First steps: a consistent breakfast, cutting out energy drinks and sugary sodas, and limiting screen time. Magnesium and riboflavin at pediatric doses — only under the guidance of a pediatric neurologist.

Adults over 50

With age, people with migraine often develop comorbidities like hypertension or metabolic syndrome. Diet adapts accordingly: less sodium, more Mediterranean-style (vegetables, fish, olive oil), and a careful check for interactions between supplements and medications (for example, magnesium can enhance the effects of blood thinners like warfarin).


When These Recommendations Don’t Apply

Condition / situationAvoidDo this instead
Chronic kidney diseaseHigh-dose magnesium — your kidneys may not clear it properly, causing dangerous buildup (hypermagnesemia)Only under nephrologist supervision and monitoring
Taking anticoagulants (warfarin, etc.)Self-prescribed high-dose omega-3Discuss with your provider — INR monitoring may be needed
PregnancyKetogenic diet, high-dose B2 without medical guidanceBalanced Mediterranean approach, folate, omega-3s from low-mercury fish
History of disordered eatingStrict elimination diets, “forbidden foods” listsWork with both a dietitian and a therapist; focus on “what to add,” not “what to remove”
Type 1 or Type 2 diabetesChanging your carb intake without your endocrinologistPlan jointly — neurologist and endocrinologist together
Taking MAO inhibitors (rare class of antidepressant)Any tyramine-containing foods (this combination can spike blood pressure dangerously)Strict restriction under psychiatric supervision

If you’re not sure whether a recommendation applies to you, ask before you start, not after side effects appear.


Migraine Diet Myths, Debunked

Myth 1: “Chocolate always causes migraine”

Chocolate gets blamed a lot, mostly because it contains phenylethylamine (a stimulant nervous-system compound) and tyramine (which affects blood vessels). But honest modern research — including blinded studies by Marcus et al., where some participants got real chocolate and others got identical-looking placebos — tells a different story: for most people, chocolate isn’t the cause of an attack, it’s a warning sign. A day before the headache starts, the brain craves sweets because serotonin levels are fluctuating.

In other words: chocolate isn’t the culprit — it’s the messenger. If your diary confirms the connection, limit it. If it doesn’t, try dark chocolate (70%+) in small amounts.

Myth 2: “You must completely cut out caffeine”

Depending on the person, caffeine can be both a trigger (in excess — more than 3–4 cups) and a helper (a moderate dose can knock out a mild attack, which is why it’s an ingredient in many over-the-counter pain relievers like Excedrin Migraine). The biggest mistake? Quitting caffeine cold turkey after years of daily use. Within 12–48 hours, the classic caffeine-withdrawal headache will hit — guaranteed. That’s your body protesting the missing dose. If you want to cut back, do it gradually — drop half a cup per week.

Myth 3: “A gluten-free diet helps everyone with migraine”

A gluten-free diet is medically warranted only if you have confirmed celiac disease or non-celiac gluten sensitivity. Research does show a link — people with celiac disease have migraine roughly twice as often, and going gluten-free reduces their attacks. But for everyone else, there’s no current scientific evidence that going gluten-free helps migraine. Get tested before you commit.

Myth 4: “If I cut out every food on the trigger list, I’ll be attack-free”

A universal “do-not-eat” list with 30+ items leads to nutrient deficiencies, anxious eating, and — paradoxically — often worse migraine. The modern, evidence-based approach is to keep a food and headache diary for 6–8 weeks, then work with your doctor to eliminate only your confirmed triggers (usually 2–4 items for any given person). That’s evidence-based strategy, not a diet myth.

The Bottom Line

Diet isn’t a magic bullet for migraine — it’s one pillar of a comprehensive approach that also includes sleep, physical activity, stress management, and (when needed) preventive medication. The strongest evidence backs the basics: regular meals, adequate hydration, a Mediterranean-style eating pattern, sufficient magnesium and riboflavin, and limiting alcohol and processed foods.

What to do today

  1. Start a food and headache journal — a simple notebook or an app like Migraine Buddy works perfectly
  2. Anchor your breakfast. Make it non-negotiable and within an hour of waking
  3. Audit your water intake. Most people drink less than they think
  4. In 6–8 weeks, review with your neurologist — identify your real triggers and build an individualized plan

A smart migraine diet can meaningfully reduce attack frequency — but it doesn’t replace medical care, especially if you have frequent or chronic migraine. Find your team, track your patterns, and trust the process.

Questions & answers

Does magnesium help an acute migraine attack?

Magnesium isn’t a rescue medication — it’s “daily insurance.” It only works if you take it consistently; grabbing a tablet mid-attack won’t help. The only exception is IV magnesium sulfate, which neurologists sometimes use in the ER for severe attacks, attacks with aura (visual flickers, numbness, strange sensations), or severe menstrual migraine. That’s an in-clinic procedure, not a home remedy. For acute pain at home, use your prescribed triptan (like sumatriptan/Imitrex) or a gepant (like Ubrelvy or Nurtec ODT) per your treatment plan.

How long until dietary changes show results?

Most studies document an effect after 8–12 weeks of consistent adherence. During the first 2–4 weeks, your body is recalibrating — attacks may even briefly increase. That’s normal; don’t panic and don’t quit. If after 3 months you see no clear positive trend, talk to your doctor about adding medical prevention.

Can I drink wine with migraine?

Red wine is the #1 alcoholic trigger — it contains three migraine-unfriendly compounds at once: tyramines (vascular effects), histamine (the same compound responsible for allergic reactions), and sulfites (preservatives). If migraine consistently follows red wine, drop it. White wine and clear spirits (vodka, tequila) are usually better tolerated, but they still dehydrate you. General rule: with frequent attacks, alcohol is strictly limited; with rare attacks, no more than 1 drink, with a “chaser” of water.

Does intermittent fasting help with migraine?

The evidence is split. Some people genuinely feel better, but the most authoritative reviews (including Cochrane Reviews — the gold standard of evidence-based medicine) find the opposite: fasts longer than 16 hours tend to worsen attacks, because blood sugar drops too low (hypoglycemia). Gentler protocols (12:12) are safer but still aren’t for everyone. If you want to try it, do so only after consulting your doctor, and track results with a diary.

Should I get blood work before starting supplements?

Ideally, run at least 4 baseline labs:

  • RBC magnesium (specifically — it’s more accurate than serum magnesium)
  • Vitamin D (labeled as “25(OH)D” on most panels)
  • Vitamin B12
  • Ferritin (iron stores)

This is the basic “migraine panel.” Supplement dosing is far more accurate when calibrated to your actual levels than guessed at. Have your physician interpret the results.

Should I go dairy-free for migraine?

Only if your doctor confirms lactose intolerance (you lack lactase, the enzyme that breaks down milk sugar) or a casein allergy. Otherwise, no. Medium-fat dairy (plain yogurt, kefir, mozzarella) is neutral or beneficial for most people with migraine — they provide protein, calcium, and riboflavin.

Does ginger help with migraine?

A 2014 study (Maghbooli et al.) showed something interesting: 250 mg of powdered ginger for an acute attack reduced pain about as effectively as sumatriptan — with almost no side effects. The results are encouraging but limited (small sample size). As an add-on, ginger tea at the first sign of an attack is safe for most people.

Medical Disclaimer

This article is for informational purposes only and does not constitute medical advice. Before making any significant changes to your diet or if you have chronic health conditions, please consult a physician or a certified dietitian.

How we created this article

We adhere to strict editorial standards to ensure
that every fact is verified by experts.

27/05/2026
ORIGIN
ARTICLE CREATION
Collection of primary data and writing of the basic manuscript.
- Account

Personal cabinet

Join IamChef

Save your favorite recipes, create meal plans, and share your own dishes.

what you get
Saved recipes
Your favorite dishes collection in one tap
Shopping lists
Automatically from chosen recipes
Personal Calories/Macros allowance
Diets tailored to your goal