What to Eat to Prevent Migraines: A Practical, Non-Restrictive Guide
Diet and migraine prevention often gets reduced to long lists of 'foods to avoid' — but what you eat regularly to support a stable system matters at least as much as what you cut out. Here's the proactive side of the equation.
Search "diet and migraine" and you'll mostly find lists of foods to avoid — chocolate, red wine, aged cheese, processed meats. That information has its place, but it tells only half the story, and an overly restrictive approach can backfire by adding stress and limiting nutrition without much benefit. The less-discussed half is this: certain foods and eating patterns appear to support a more stable system overall, making you somewhat more resilient to other triggers. Here's what that looks like in practice.
Regular Meals Matter More Than Almost Anything Else
If there's one dietary change with the broadest support, it's this: don't skip meals, and don't let long gaps form between them. Blood sugar drops are a well-recognized migraine trigger, and skipping breakfast or going six-plus hours without eating during the day is one of the most common — and most fixable — patterns behind "random" attacks. This matters enough that it's worth treating as a baseline habit rather than something to optimize only when you remember.
Magnesium-Rich Foods
Magnesium has reasonable evidence behind it for migraine prevention, and getting more from food is a low-risk way to support that, alongside any supplementation a doctor might recommend. Foods relatively rich in magnesium include leafy greens (spinach, Swiss chard), nuts and seeds (almonds, cashews, pumpkin seeds), legumes, whole grains, and dark chocolate (in moderation — for some people chocolate is also a trigger, so this is worth testing individually).
Riboflavin (Vitamin B2) Sources
Riboflavin is another nutrient with research support for migraine prevention at higher-than-typical-dietary doses, but everyday food sources are still worth incorporating: eggs, lean meats, dairy, almonds, and fortified whole grains and cereals are all reasonable sources.
Omega-3 Fatty Acids
Fatty fish (salmon, mackerel, sardines), walnuts, chia seeds, and flaxseed provide omega-3s, which have some evidence for reducing inflammation in ways that may be relevant to migraine. These are easy, generally beneficial additions regardless of the migraine connection specifically.
Hydrating Foods
Beyond drinking water directly (covered in our piece on dehydration and daily migraines), foods with high water content — cucumber, watermelon, oranges, soups and broths — contribute to overall hydration status and can be especially useful if you struggle to drink enough plain water throughout the day.
A Note on "Trigger Foods"
Common dietary triggers — aged cheeses, processed/cured meats (often due to nitrates), alcohol (especially red wine), and foods containing MSG — are worth being aware of, but it's important not to over-apply this. Trigger foods are highly individual: many people with migraine can eat any of these without issue, while for others, one specific item is a reliable trigger and the rest are fine. Eliminating entire food categories "just in case," without evidence they're actually a problem for you specifically, often isn't worth the nutritional and lifestyle cost.
If you suspect a specific food, our Trigger Pattern Analyzer can help you look for a pattern across your logged attacks — a much more useful approach than broad elimination diets, which can be hard to sustain and difficult to interpret (since removing many foods at once makes it unclear which one, if any, actually mattered).
Putting It Together: A Realistic Pattern
None of this requires a dramatic diet overhaul. A realistic, sustainable pattern looks more like: don't skip meals, especially breakfast; build meals around whole foods most of the time without being rigid about it; include a source of magnesium and omega-3s regularly (a handful of nuts, fish a couple times a week); stay ahead of hydration rather than catching up after the fact; and notice — without obsessing — whether any specific food seems to consistently precede attacks for you.
This connects directly to managing an attack once it starts, too — see our guide on the best foods to eat during a migraine for the acute side of the equation, and our broader overview of common migraine triggers for how diet fits alongside sleep, stress, hormones, and weather.
The Bottom Line
Diet's role in migraine prevention is less about a perfect list of "good" and "bad" foods and more about supporting a stable baseline — steady blood sugar, adequate hydration, and a generally nutrient-rich pattern — while staying alert to any genuinely individual triggers without over-restricting based on general lists that may not apply to you.
Track your attacks alongside automatic pressure and weather data to see what's actually converging before your worst migraines. Download MigraineCast free on iOS.
Frequently Asked Questions
What foods help prevent migraines?
Focus on foods that support a stable baseline: magnesium-rich foods (leafy greens, nuts, seeds, legumes), omega-3 sources (fatty fish, walnuts, chia seeds), riboflavin-rich foods (eggs, lean meats, almonds), and high-water-content foods (cucumber, watermelon, soups). The bigger principle is maintaining steady blood sugar through regular meals — skipping meals is one of the most reliably documented dietary triggers.
Should I avoid all migraine trigger foods?
No — dietary triggers are highly individual. Many people with migraine can eat aged cheese, chocolate, or red wine without issue, while others have a genuine pattern with one specific item. Broad elimination diets based on general trigger lists often cause unnecessary restriction without meaningful benefit. A better approach: track your attacks and look for any food that appears consistently in the hours before attacks across multiple occurrences — that's worth eliminating individually to test.
Is chocolate a migraine trigger?
For some people, yes — but the evidence is more nuanced than popular lists suggest. Chocolate is often consumed during prodrome (the pre-headache phase), where food cravings are common, which can make it appear to "cause" an attack that was already underway. True chocolate sensitivity exists but is less universal than commonly believed. If you suspect it, eliminate it specifically for 2–3 months and compare attack frequency rather than avoiding it indefinitely based on general advice.