provider image
Welcome! You’re in GoodRx for healthcare professionals. Now, you’ll enjoy a streamlined experience created specifically for healthcare professionals.
Skip to main content
HomeHealth ConditionsHeadaches

7 Foods That Help Stop Your Headaches

Laurie TarkanPatricia Pinto-Garcia, MD, MPH
Published on May 1, 2024

Key takeaways:

  • Certain foods can help lower your chances of getting headaches.

  • Research shows that foods that reduce inflammation and keep blood vessels from enlarging, like seeds and nuts with magnesium, can help headaches.

  • Foods rich in antioxidants can help get rid of free radicals that can irritate nerves and lead to headaches.

Woman in the kitchen holding an orange.
NataBene/iStock via Getty Images Plus

You probably know that certain foods can trigger a headache or a migraine. Think red wine, monosodium glutamate (MSG), and aged cheeses. But there are also foods that can protect you from getting a headache, and even a few that may help relieve your pain in the moment. 

Food not only provides us with nutrients and energy, but it contains components that have a range of effects on our bodies — including some that raise or lower your chances of getting a headache. These components might affect the function of the brain chemical serotonin or block pain chemicals. They can also decrease inflammation, impact blood vessels, and even contain antioxidants that neutralize free radicals (reactive molecules that can inflict damage on our cells).

1. Seeds and nuts

Seeds and nuts are rich in magnesium, a mineral that’s known to help prevent headaches and migraines. Studies have shown that taking magnesium can reduce the risk of an aura, which is the visual or other sensory changes that some people get just before a migraine hits. It also blocks some pain chemicals and helps prevent the narrowing of blood vessels, which can contribute to a headache. The American Migraine Foundation recommends that people who get frequent migraines take magnesium supplements, but you can increase your magnesium levels through your diet. 

Top magnesium-rich seeds are:

  • Pumpkin seeds

  • Chia seeds

Top nuts high in magnesium are: 

  • Almonds 

  • Cashews

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 the brain, this stress can cause inflammation of nerves, which may set you up for a 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. 

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 intensity and frequency of migraine headaches.

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 the body. Studies have found that higher levels of omega-3 fatty acids and lower levels of omega-6 fatty acids (a less healthy fat) can reduce the frequency and severity of headaches. Along with fatty fish, chia seeds and flax seeds also are high in omega-3s.

Fish rich in omega-3 fatty acids include:

  • Salmon

  • Mackerel

  • Tuna

  • Herring

  • Sardines

6. Chocolate

Chocolate can help some people get rid of migraine headaches. Migraines can be triggered when blood vessels in your head enlarge or dilate. But caffeine can help shrink blood vessels and is sometimes recommended for headache relief. In fact, certain over-the-counter (OTC) headache medications, like Excedrin, contain caffeine.

Chocolate is a natural way to get caffeine and may help ward off a developing headache. Dark chocolate has more caffeine than milk chocolate. And the higher the percentage of cocoa, the more powerful its effects. But for some people, chocolate may be a migraine trigger, so make sure this is not the case for you first.

7. Coffee

If chocolate is a migraine trigger or you don’t want the sweets, you can sip a small cup of coffee for migraine headache relief. But you don’t want to have too much caffeine, which could lead to rebound headaches. 

Dietary do’s and don’ts when treating headaches naturally

Aside from what you eat, how you eat can also help prevent headaches. It’s important to eat regular meals and not let too much time pass between them. Missing meals or waiting too long between them can cause a drop in blood sugar. This can trigger headaches if you’re living with diabetes or another medical condition that impacts your blood sugar levels. Consider eating five small meals per day to prevent this. 

It’s important to eat a balanced diet. But some research shows that a diet higher in protein and lower in carbohydrates may help reduce the frequency and intensity of headaches. It’s also helpful to eat a low-fat diet and choose healthy fats, like omega-3 fatty acids. 

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.

The bottom line

Foods contain a range of nutrients that can affect how your body functions. People who get migraines may be more sensitive to changes in the body, like inflammation, blood sugar levels, and changes in brain chemicals. Choosing foods that can lower these risk factors may help reduce both your risk and severity of headaches. 

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.
Patricia Pinto-Garcia, MD, MPH
Patricia Pinto-Garcia, MD, MPH, is a medical editor at GoodRx. She is a licensed, board-certified pediatrician with more than a decade of experience in academic medicine.

References

American Migraine Foundation. (2017). Caffeine and migraine.

American Migraine Foundation. (2021). Magnesium and migraine.

View All References (5)

Arca, K. N., et al. (2021). Dehydration and headache. Current Pain and Headache Reports.

Goschorska, M., et al. (2020). The use of antioxidants in the treatment of migraine. Antioxidants.

Jahromi, S. R., et al. (2019). Association of diet and headache. Journal of Headache and Pain.

Khorsha, F., et al. (2020). Association of drinking water and migraine headache severity. Journal of Clinical Neuroscience.

Office of Dietary Supplements. (2022). Magnesium: Fact sheet for health professionals. National Institutes of Health.

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?

Your Guide to Sustainable Weight Loss

Our 6-day newsletter series breaks down the latest medications and how you can achieve sustainable weight loss.

By signing up, I agree to GoodRx's Terms and Privacy Policy, and to receive marketing messages from GoodRx.

Related Articles