Several nutrients have strong evidence for reducing migraine frequency, and you can get most of them through everyday foods. Magnesium, omega-3 fatty acids, and riboflavin (vitamin B2) top the list, while avoiding certain fermented and aged foods can remove common triggers. Dietary changes typically need two to three months of consistency before you’ll notice a meaningful difference in how often migraines hit.
Omega-3 Rich Fish and Seeds
Omega-3 fatty acids, the kind found in salmon, sardines, mackerel, flaxseed, and walnuts, are some of the best-studied dietary tools for migraine prevention. A clinical trial of 182 people who experienced migraines 5 to 20 days per month found that increasing omega-3 intake led to fewer headache days, fewer total hours of headache, and less time spent in moderate-to-severe pain over 16 weeks compared to a typical American diet.
The study, funded by the National Institutes of Health, also found that the benefit was even greater when participants simultaneously reduced their intake of omega-6 fats, particularly linoleic acid. Linoleic acid is concentrated in vegetable oils like soybean, corn, and sunflower oil, as well as many processed and fried foods. So the strategy isn’t just adding more fish. It’s also cooking with olive oil or avocado oil instead, and cutting back on packaged snacks made with seed oils.
Magnesium-Rich Foods
Magnesium plays a direct role in the brain activity that triggers migraines. It blocks a specific type of nerve signaling involved in cortical spreading depression, the wave of electrical activity thought to initiate migraine aura and pain. People with migraines consistently show lower magnesium levels than those without, and magnesium content in fruits, cereals, and vegetables has declined significantly over the past 40 years due to changes in soil and farming practices.
The richest food sources include pumpkin seeds, almonds, cashews, black beans, spinach, dark chocolate (70% cacao or higher), avocados, and whole grains like quinoa and brown rice. A single ounce of pumpkin seeds delivers nearly 40% of the daily magnesium requirement. Building these into your regular meals, rather than relying on occasional servings, helps maintain steady levels.
Foods High in Riboflavin (Vitamin B2)
The American Headache Society recognizes riboflavin as a tool for migraine prevention, with a commonly used dose of 400 milligrams a day. That’s well above what you’d get from food alone, so supplements are often necessary to reach therapeutic levels. Still, riboflavin-rich foods contribute to your baseline and support mitochondrial energy production in brain cells, which is one proposed reason it helps.
Good dietary sources include eggs, lean beef, lamb, mushrooms, almonds, and fortified cereals. Dairy products like milk and yogurt also contain meaningful amounts. While food alone won’t match the 400-milligram target used in clinical settings, consistently eating these foods builds a foundation that a supplement can top off.
Ginger for Acute Attacks
When a migraine is already underway, ginger may help. A clinical trial comparing ginger powder to sumatriptan, one of the most widely prescribed migraine medications, found that both reduced headache severity by a similar amount within two hours. Ginger is inexpensive, widely available, and has far fewer side effects than most medications.
You can use fresh ginger steeped in hot water as a tea, or keep ground ginger powder on hand. Adding ginger to smoothies, soups, or stir-fries also works as a regular dietary habit, though the acute relief data specifically comes from taking it at migraine onset.
Steady Blood Sugar, Fewer Attacks
Skipping meals is one of the most commonly reported migraine triggers, and the mechanism likely involves blood sugar crashes disrupting energy supply to the brain. There’s evidence that low-glycemic diets, which avoid sharp spikes and drops in blood glucose, can reduce both the intensity and duration of migraine attacks. Researchers believe this works partly by providing the brain with a more stable energy source and partly by reducing neuronal inflammation.
In practice, this means choosing foods that release energy slowly: oats, sweet potatoes, legumes, whole grains, nuts, and most vegetables. Pairing carbohydrates with protein or fat slows digestion further. A breakfast of eggs with whole-grain toast, for example, will keep blood sugar far more stable than cereal with juice. Eating at regular intervals matters just as much as what you eat.
Hydration Matters More Than You Think
Dehydration is an underappreciated migraine contributor. A randomized trial found that increasing daily water intake by 1.5 liters improved migraine-related quality of life by a statistically significant margin. The improvement showed up in how patients rated the overall impact of migraines on their daily functioning. Water-rich foods like cucumbers, watermelon, oranges, and celery can supplement what you drink, though they shouldn’t replace deliberate water intake.
Foods to Avoid: The Tyramine Connection
Certain foods contain tyramine, a naturally occurring compound that builds up during aging, fermenting, pickling, and spoiling. Tyramine is one of the more reliable dietary migraine triggers, and reducing it can be as important as adding beneficial foods.
The highest-tyramine foods to limit or avoid include:
- Aged cheeses: cheddar, camembert, gouda, gruyere, parmesan, stilton, Roquefort
- Cured and dried meats: salami, pepperoni, jerky, mortadella
- Fermented foods: sauerkraut, kimchi, miso, tempeh, fermented tofu
- Fermented sauces: soy sauce, teriyaki, fish sauce, shrimp paste
- Overripe fruit and any food past its use-by date
Safe swaps that fill the same role in meals: cottage cheese, ricotta, or cream cheese instead of aged varieties. Fresh meat and canned fish (eaten right after opening) instead of cured meats. Fresh vegetables and legumes instead of pickled or fermented ones. Peanut butter, jam, mustard, and BBQ sauce are all fine as spreads and condiments.
How Long Before You See Results
The American Migraine Foundation recommends giving any dietary change at least two to three months before judging whether it’s working. Migraines fluctuate naturally, so a good week doesn’t confirm a strategy and a bad week doesn’t rule one out. Keeping a simple log of what you eat alongside your headache days helps you spot real patterns rather than coincidences. Start with one or two changes, like adding omega-3s and cutting back on aged cheese, rather than overhauling everything at once. That way, when your migraine frequency shifts, you’ll have a clearer idea of what’s actually making the difference.