What Food Helps a Migraine: Nutrients and Triggers

Several nutrients found in everyday foods can reduce how often migraines strike and how intense they feel. The strongest evidence points to magnesium, omega-3 fatty acids, riboflavin (vitamin B2), and folate as dietary allies against migraine. Equally important is avoiding certain foods that act as triggers and keeping your blood sugar steady throughout the day.

Magnesium-Rich Foods

Magnesium is one of the most studied nutrients for migraine prevention. The American Headache Society recommends 400 to 500 milligrams of magnesium oxide daily for people who get frequent migraines. While supplements are the most common delivery method, building magnesium into your diet gives you a baseline that helps close the gap.

The best food sources include pumpkin seeds (about 156 mg per ounce), almonds (80 mg per ounce), spinach (78 mg per half cup, cooked), black beans (60 mg per half cup), and dark chocolate (65 mg per ounce). Avocados, cashews, and whole grains also contribute meaningful amounts. Most people with migraines have lower magnesium levels than average, so consistently eating these foods is a practical first step even before considering a supplement.

Omega-3 Fatty Acids

A diet high in omega-3 fats and low in omega-6 fats (the kind concentrated in vegetable oils and processed snacks) can meaningfully reduce migraine frequency. A meta-analysis published in Neurology found that omega-3 supplementation reduced headache days by roughly two per month. That may sound modest, but for someone dealing with eight or ten migraine days a month, losing two is significant.

The richest food sources are fatty fish: salmon, mackerel, sardines, herring, and anchovies. Aim for two to three servings per week. Plant-based options include walnuts, flaxseeds, chia seeds, and hemp seeds, though your body converts these forms less efficiently. Just as important as adding omega-3s is cutting back on omega-6-heavy oils like corn, soybean, and sunflower oil, which promote inflammation that can worsen migraine.

Riboflavin (Vitamin B2) Foods

Riboflavin supports the tiny energy factories inside your cells, called mitochondria. Mitochondrial dysfunction is thought to play a causal role in some types of migraine, and riboflavin is required for those energy pathways to work properly. Clinical trials have used 400 mg daily (far above what food alone provides), but a riboflavin-rich diet still contributes to your overall intake and may help alongside a supplement.

Beef liver is the standout source at 2.9 mg per three-ounce serving. After that, fortified cereals (1.3 mg per serving), instant oats (1.1 mg per cup), plain yogurt (0.6 mg per cup), and milk (0.5 mg per cup) are the most practical everyday options. Almonds, mushrooms, eggs, salmon, and quinoa each add smaller amounts that accumulate over the course of a day.

Folate for Migraine With Aura

If your migraines come with visual disturbances or other aura symptoms, folate deserves special attention. Research led by Dr. Lyn Griffiths found a significant correlation between higher dietary folate intake and lower migraine frequency in women with migraine with aura. The connection is strongest in people who carry a common genetic variant (MTHFR C677T) that impairs folate metabolism, though many people carry this variant without knowing it.

Good sources include spinach, lentils, black-eyed peas, asparagus, lettuce, avocado, broccoli, and fortified grain products. A large spinach salad with avocado and lentils covers a substantial portion of the daily recommended intake in a single meal.

Ginger for Acute Migraine Pain

When a migraine is already underway, ginger can help. A clinical trial compared 250 mg of powdered ginger to 50 mg of sumatriptan (a standard migraine medication) and found nearly identical pain reduction two hours after treatment. Both groups saw their pain scores drop by about 4.6 to 4.7 points on a 10-point scale. Ginger also carried very few side effects: only about 1 in 34 people experienced any adverse reaction.

You can use fresh ginger steeped in hot water as a tea, or keep powdered ginger capsules on hand. Some people grate fresh ginger into smoothies or broth at the first sign of an attack. It won’t replace prescription treatment for severe or frequent migraines, but it’s a practical option when you’re caught without medication or prefer to try a food-based approach first.

Keeping Blood Sugar Steady

Skipping meals and blood sugar crashes are well-established migraine triggers. Recent research published in Frontiers in Neurology found that people with chronic migraine showed significantly more blood sugar variability than healthy controls. After meals, migraine patients experienced 44% more severe or prolonged dips in blood sugar below baseline. The researchers believe these glucose swings may actually contribute to migraines becoming more frequent over time.

The practical fix is straightforward: eat at regular intervals and choose foods that release energy slowly. Pair protein or fat with carbohydrates at every meal. Oatmeal with nuts and seeds, eggs with whole-grain toast, or chicken with roasted vegetables and quinoa all provide steady fuel. Avoid large servings of refined carbohydrates (white bread, sugary cereals, pastries) on an empty stomach, since these cause the rapid spike-and-crash pattern that can set off an attack.

Foods That Trigger Migraines

What you avoid matters as much as what you eat. Tyramine, a compound that builds up naturally as foods age, ferment, or sit in storage, is one of the most common dietary migraine triggers. It forms from the breakdown of an amino acid found in protein-rich foods.

The highest-tyramine foods to watch for include:

  • Aged cheeses: blue, brie, cheddar, Swiss, provolone, Roquefort, and stilton
  • Cured and processed meats: pepperoni, salami, liverwurst, and anything smoked, dried, or pickled
  • Fermented foods: sauerkraut, miso, soy sauce, teriyaki sauce, and pickled herring
  • Alcohol: red wine (especially Chianti and burgundy), sherry, vermouth, beer, and ale
  • Flavor enhancers: yeast extracts, meat extracts, and MSG-containing seasoned salts

Not every migraine sufferer reacts to every trigger food. The most reliable way to identify your personal triggers is to keep a food diary for several weeks, noting what you ate in the 24 hours before each attack. Some people find they can tolerate small amounts of aged cheese but not cured meats, or vice versa. Freshness is the general rule: the fresher the food, the lower the tyramine content.

Putting It Together

A migraine-friendly eating pattern combines these principles into something sustainable. Build meals around fresh proteins (fish, chicken, eggs), vegetables rich in magnesium and folate (spinach, broccoli, avocado), whole grains like oats and quinoa, and healthy fats from nuts, seeds, and olive oil. Eat at consistent times, don’t skip meals, and keep ginger tea or capsules accessible for when an attack starts. Minimize processed and aged foods, cut back on omega-6-heavy cooking oils, and pay attention to your own patterns with a food diary. These changes won’t eliminate migraines entirely, but for many people they reduce the frequency and severity enough to make a real difference in daily life.