When a migraine hits, eating the right foods can help stabilize your blood sugar, reduce inflammation, and avoid compounding the pain. Equally important is knowing which foods to skip, since certain compounds in common foods are well-established migraine triggers. What you eat during an attack and in the days between attacks both matter.
Keep Your Blood Sugar Steady
Fasting is one of the most frequently reported migraine triggers, with 39% to 66% of migraine patients identifying skipped or delayed meals as a factor. When your blood sugar drops, it can directly worsen or even initiate an attack. If you’re in the middle of a migraine and haven’t eaten, getting something in your stomach is one of the simplest things you can do.
Reach for foods that release energy slowly rather than spiking your blood sugar. Oatmeal, whole grain bread, sweet potatoes, lentils, and most non-starchy vegetables are good options. In one clinical report, a patient who switched to a low-glycemic diet saw migraine frequency drop from 10 attacks per month to just 1, with intensity also declining. A separate study of 45 migraine patients on a similar diet for six months found significant improvement compared to a control group. The pattern is clear: foods that keep blood sugar stable tend to reduce both the frequency and severity of attacks.
During an active migraine, when nausea makes eating difficult, small portions of bland, slow-digesting carbohydrates like plain rice, a banana, or a piece of toast can help. The goal is to prevent your blood sugar from bottoming out without overwhelming your stomach.
Foods That Fight Migraine Inflammation
Omega-3 fatty acids, the kind found in salmon, sardines, mackerel, and other oily fish, have a direct effect on migraine frequency. An NIH-funded trial of 182 people who experienced 5 to 20 migraine days per month tested three different diets over 16 weeks. Participants who increased their omega-3 intake while also reducing omega-6 fatty acids (found in vegetable oils like corn, soybean, and sunflower oil) had fewer headache days per month than any other group. Even increasing omega-3s alone, without cutting omega-6s, helped, but the combination was more effective.
Practical choices here include eating fatty fish two to three times per week, using olive oil instead of vegetable oil for cooking, and snacking on walnuts or flaxseeds rather than chips fried in seed oils. During a migraine, a light piece of baked salmon with rice is both easy on the stomach and actively working against the inflammatory processes involved in the attack.
Magnesium-Rich Foods
Magnesium plays a role in nerve signaling and blood vessel function, both of which go haywire during a migraine. Research shows that insufficient magnesium intake is associated with migraines in adults aged 20 to 50, and major headache societies recommend 400 to 600 mg per day for people with migraines. That’s modestly higher than the general FDA recommendation of about 400 mg for men and 310 mg for women.
You can get meaningful amounts of magnesium from dark leafy greens (spinach, Swiss chard), pumpkin seeds, almonds, black beans, avocado, and dark chocolate. A cup of cooked spinach provides roughly 150 mg. A quarter cup of pumpkin seeds delivers around 190 mg. Building these into your regular meals helps maintain a baseline that may reduce how often migraines strike. During an attack, if you can tolerate food, a handful of almonds or some avocado on toast are reasonable choices.
Foods to Avoid During a Migraine
Certain compounds in food are known to trigger or worsen migraines in susceptible people. The main culprits are tyramine, nitrates, and MSG.
- Tyramine builds up in aged and fermented foods. Aged cheeses (cheddar, blue cheese, Parmesan), cured meats (salami, pepperoni), fermented soy products, and red wine are the biggest sources. The longer a protein-rich food has been aged or stored, the more tyramine it contains.
- Nitrates are preservatives found in hot dogs, bacon, deli meats, and other processed meats. They affect blood vessel dilation in ways that can intensify migraine pain.
- MSG (monosodium glutamate) appears in many restaurant dishes, packaged snacks, and seasoning blends. It’s sometimes listed on labels as “hydrolyzed protein” or “natural flavoring.”
Other commonly reported trigger foods include chocolate, citrus fruits, and alcohol, particularly red wine and beer. Not every person with migraines reacts to every trigger, so tracking which foods precede your attacks is more useful than blanket elimination. But during an active migraine, avoiding all of these is a safe strategy.
Caffeine: A Double-Edged Sword
Caffeine constricts blood vessels and is actually an ingredient in some headache medications. A small amount during a migraine, like a cup of black tea or half a cup of coffee, can genuinely help with pain. The problem is overuse. If you regularly consume more than 200 mg of caffeine per day (roughly two cups of coffee), stopping abruptly can trigger withdrawal headaches that feel identical to migraines.
The recommended ceiling for migraine patients is 200 mg per day. If you’re currently drinking more than that, tapering down gradually prevents withdrawal attacks. And if you use caffeine as a migraine rescue tool, keep it occasional so it stays effective.
Nutrients Worth Building Into Your Diet
Two nutrients stand out for their role in migraine prevention over time, and both are available through food.
Riboflavin (vitamin B2) has been studied at high doses for migraine prevention and shown to be effective and well-tolerated. While the clinical dose of 400 mg per day typically requires a supplement, food sources like eggs, lean meats, mushrooms, and fortified cereals contribute meaningful amounts. Every bit of B2 supports the energy production processes in your brain cells that appear to malfunction during migraines.
Coenzyme Q10 is found in eggs, fish, meat, nuts, and certain vegetables. Supplementation studies have shown it reduces both the frequency and duration of migraine attacks, as well as the severity of nausea during episodes. Like riboflavin, therapeutic doses usually require supplements, but regularly eating CoQ10-rich foods contributes to your overall levels. Both nutrients are thought to work by improving how efficiently your cells produce energy, addressing what may be a core vulnerability in people who get migraines.
A Simple Eating Plan During an Attack
When you’re in the grip of a migraine, appetite is usually the last thing on your mind. Nausea, light sensitivity, and pain make elaborate meals impossible. Keep it simple: eat something small every few hours to prevent blood sugar crashes from making things worse.
Good options include plain rice or oatmeal, a piece of whole grain toast with avocado, a small portion of baked or canned salmon, a banana (though some people find these are a personal trigger), scrambled eggs, or a handful of almonds with some water. Stay well hydrated, since dehydration is itself a migraine trigger. Broth-based soups are helpful because they provide both fluid and electrolytes.
Between attacks, the bigger picture matters more. A diet built around whole grains, vegetables, fatty fish, nuts, and seeds, while minimizing processed meats, aged cheeses, and excess vegetable oils, addresses multiple migraine pathways at once: blood sugar stability, inflammation, and nutrient status. The consistency of your eating pattern, not skipping meals and not fasting for long stretches, may be just as important as the specific foods you choose.

