Skip to main content
Headaches

What Foods Help With Headaches and Migraines? 6 Options to Consider

Laurie TarkanSarah Gupta, MD
Written by Laurie Tarkan | Reviewed by Sarah Gupta, MD
Updated on September 29, 2025

Key takeaways:

  • Certain foods may help lower your chances of getting headaches or migraines.

  • Research shows that some foods may help to reduce inflammation and keep blood vessels from enlarging, which may help to prevent or even treat headaches and migraines. 

  • Foods rich in antioxidants might also help to get rid of free radicals, which can irritate nerves and contribute to headaches.

For some people, certain foods seem to trigger a headache or a migraine. Think red wine, monosodium glutamate (MSG), and aged cheeses. But there are also foods that may help to protect you from headaches or migraines — and even a few that may help relieve your pain in the moment. 

Foods give us nutrients and energy. But they also contain other components that can affect our bodies in a range of ways — including some that might potentially raise or lower your chances of getting a headache. These components might affect the brain chemical serotonin or block pain chemicals. They can also decrease inflammation, impact blood vessels, and provide antioxidants that neutralize free radicals (reactive molecules that can inflict damage on our cells).

Let’s take a closer look at which foods might help with headache and migraines. 

1. Seeds and nuts

Seeds and nuts are rich in magnesium, a mineral that’s known to help prevent headaches and migraines. Magnesium may be especially helpful for people with migraine with aura or menstrual migraines

The American Migraine Foundation recommends that people with migraines consider taking magnesium supplements. But you can also increase your magnesium levels by eating more nuts and seeds. 

Top options include:

  • Pumpkin seeds

  • Chia seeds

  • Almonds

  • Cashews

But keep in mind: Nuts and seeds also contain a substance called tyramine. This may actually be a headache or migraine trigger for some people. 

2. Berries

Berries contain tons of antioxidants, which can neutralize free radicals. These highly reactive molecules can cause what’s known as oxidative stress. In your brain, this stress can cause nerve inflammation, which may set you up for a headache or migraine. 

Eating foods rich in antioxidants may help stop this inflammation. But the research on this is somewhat limited. Berries are always nutritious, so it’s always good to eat more of them. 

GoodRx icon

Berries bursting with antioxidants include:

  • Blueberries

  • Cranberries

  • Blackberries

3. Citrus fruits

Citrus fruits — like oranges, clementines, and grapefruits — are packed with vitamin C, a potent antioxidant. There’s some evidence that vitamin C can help reduce the risk of having migraines or severe headaches. 

But just like nuts and seeds, be aware: Citrus can also be a migraine trigger for some people.

4. Leafy greens

Dark leafy greens, like spinach and kale, are rich in magnesium and antioxidants. So, they may help reduce headaches by chasing down free radicals and lowering inflammation.

5. Fatty fish

All fish have healthy fats. But some contain a lot of omega-3 fatty acids, a type of fat that helps lower inflammation in your body. Studies have found that having more omega-3 fatty acids and fewer omega-6 fatty acids (a less healthy fat) can reduce how often and how severe headaches are. Along with fatty fish, chia seeds and flax seeds are also high in omega-3s.

Fish rich in omega-3 fatty acids include:

  • Salmon

  • Mackerel

  • Tuna

  • Herring

  • Sardines

6. Fiber

Eating fiber has many health benefits. And there’s some evidence that eating more fiber may help to reduce severe headache and migraine frequency. Adults should consume at least 20 g to 30 g of fiber each day. And some people may need even more depending on their age and sex. 

Top sources of fiber include:

  • Whole vegetables and fruits

  • Beans and lentils

  • Whole grains

  • Nuts and seeds

What foods can trigger migraines?

It’s hard to say. Many people with migraines say that certain foods and drinks can trigger an attack. These include:

  • Cheese

  • Chocolate

  • Alcohol

  • Processed meats

  • Monosodium glutamate (MSG)

  • Caffeine

  • Gluten

  • Artificial sweeteners

But in reality, there’s not a lot of evidence that these foods trigger migraine attacks in most people. Experts also believe that foods that seem to trigger migraines might actually be cravings that happen before the actual headache begins, during what’s called the “prodrome” phase. 

What’s the best diet for migraine headaches?

In research studies, certain diets seemed to be especially helpful for people with migraines:

If you get headaches or migraines, it can also be important to eat regular meals and not let too much time pass between them. Missing meals can cause a drop in blood sugar, which can trigger headaches or migraines in some people. Eating at regular times throughout the day can help prevent this. 

Lastly, be sure to drink enough water. Dehydration is a known trigger for many types of headaches. Try to drink about 1.5 L of water a day. This is like drinking an 8-oz glass of water, 6 times throughout your day.

Frequently asked questions

If you’re dealing with headaches or migraines, it’s a good idea to keep a “headache diary.” This can help you keep track of how often you’re having headaches and can also help you identify patterns or triggers. Use an app on your smartphone or computer, or write on a paper headache log

Yes, iron deficiency can cause many symptoms, including headaches. 

Yes, as your body transitions to ketosis, it’s common to have headaches and other symptoms (known as the “keto flu”). These symptoms usually go away within the first week.

Low blood sugar (hypoglycemia) can cause many symptoms, including headaches. If your blood sugar is low, eating a fast-acting carb like fruit juice, honey, or sugar can help. 

If you’re concerned about hypoglycemia, talk to a healthcare professional. They can help you figure out if you’re experiencing low blood sugar episodes and the best way to manage them.

The bottom line

Foods contain a range of nutrients that can affect your body — and your headaches. If you have headaches or migraines, consider adding nutritious foods like berries, leafy greens, and fatty fish. And remember: If you’re looking for more guidance, consider checking in with a healthcare professional or dietician. They can help you understand how food might be affecting your headaches and migraines and guide you toward the best eating plan for your needs.

why trust our exports reliability shield

Why trust our experts?

Laurie Tarkan
Written by:
Laurie Tarkan
Laurie Tarkan is a senior health editor for general health and well-being at GoodRx. She has an extensive background in health journalism, and wrote regularly for The New York Times for a decade.
Sophie Vergnaud, MD, is the Senior Medical Director for GoodRx Health. A pulmonologist and hospitalist, she practiced and taught clinical medicine at hospitals in London for a decade before entering a career in health education and technology.
Sarah Gupta, MD
Reviewed by:
Sarah Gupta, MD
Sarah Gupta, MD, is a licensed physician with a special interest in mental health, sex and gender, eating disorders, and the human microbiome. She is currently board certified by the American Board of Psychiatry and Neurology.

References

GoodRx Health has strict sourcing policies and relies on primary sources such as medical organizations, governmental agencies, academic institutions, and peer-reviewed scientific journals. Learn more about how we ensure our content is accurate, thorough, and unbiased by reading our editorial guidelines.

Was this page helpful?

Latest articles