Health Conditions
Wellness & Self-Care
Nutrition & Fitness
News
Product Reviews
Find a Doctor
Tools & Resources
About Us
Health Conditions
Health Conditions
Find helpful content on common health and medical conditions.
See All
AllergiesCancerCardiovascular DiseasesCrohn's DiseaseEczema (Atopic Dermatitis)MenopauseMental Health Conditions
MigrainePsoriasisRheumatoid ArthritisSkin ConditionsSleepType 2 DiabetesWeight Management
Wellness and Self Care
Wellness & Self-Care
Explore wellness and self-care topics for your physical and mental well-being.
See All
Bites & StingsEmotional HealthFirst AidHealthy LivingHeart HealthHolistic HealthHealth Insurance
LongevityMental HealthRelationshipsSexual HealthSkin CareSkin Care RoutinesSkin Treatments & Procedures
Nutrition and Fitness
Nutrition & Fitness
Explore topics in nutrition and fitness that impact overall health, well-being, and energy.
See All
BeveragesDiet & NutritionDiet TypesFitnessFitness Trends & TechFood & IngredientsFood Safety
Healthy RecipesMediterranean DietKetogenic DietNutritional SupplementsPlant-Based DietsWeight & FoodWorkouts & Activities
News
Stay updated with the latest health and medical news.
See All
Featured stories
Abortion Restrictions Are Limiting Women’s Access to Ob-Gyns for Other Types of Healthcare
Estrogen Patches Are in Short Supply — Is There a Workaround?
A Swallowable Balloon for Weight Loss Gets FDA Approval
Product Reviews
Product Reviews
Learn about the best products to support your health and wellness.
See All
Diet & Nutrition ProductsFitness ProductsMedical ProductsMental Health ServicesOral & Dental Health ProductsVision ProductsWellness Products
Best Methylated VitaminsBest Vitamin D3Best Berberine SupplementsBest Magnesium SupplementsBest Online TherapyBest GLP-1 OnlineBest Fiber Supplements
Find a Doctor
Find a Doctor
Find the best doctors for you that are near you.
See All
CardiologistDermatologistGastroenterologistOB/GYN
Orthopedic SurgeonPediatricianPrimary Care
Tools and Resources
Tools & Resources
Discover tools and resources designed to support your health journey.
See All
BMI CalculatorBody Type QuizCheck In, Check UpConsumer’s GuidesFiber CalculatorDrugs & SupplementsHydration Calculator
NewsProtein CalculatorSymptom CheckerTippi - Everyday TipsVaccine PlannerVideosWeight Loss Calculator
About Us
About Us
Learn about our award-winning editorial team, health content leaders, and more.
See All
Contact UsEditorial PolicyHealth Expert NetworkPress Center
Product Testing PolicyWho We AreTrusted Health Resources
Neurological DisordersMigraine
Migraine
Get insights into managing migraines with tips on prevention, treatments, and lifestyle adjustments that can help reduce frequency and intensity of headaches.
LEARN MORE
  • 1What Is Migraine? Symptoms, Causes, Diagnosis, Treatment, and Prevention
  • 2Migraine Signs and Symptoms
  • 3How Is Migraine Diagnosed?
  • 4Causes and Risk Factors of Migraine
  • 5Migraine Treatment: A Complete Guide
  • 6Your Everyday Guide to Living Well With Migraine
SEE MORE

12 Foods to Help Get Rid of a Headache or Migraine Attack Naturally

Eating a variety of healthy foods and staying hydrated can go a long way toward preventing or relieving a headache.
By
Becky Upham
Updated on August 29, 2023
by
Jessica Baity, MD

Next up video playing in 10 seconds

12 Foods to Help Get Rid of a Headache or Migraine Attack Naturally

Headaches and Migraine attacks can be debilitating. Try eating these foods to curb your symptoms and even prevent an attack before it begins.

If you’re living with migraine, you probably know that certain foods and drinks can trigger an attack. But even though it’s important to know what to avoid, focusing on the foods to add to your diet matters, too: It may help reduce the number or severity of migraine attacks or other types of headaches.

“Food really is the first medicine,” says Wynne Brown, MD, the medical director of integrative medicine at Atrium Health Wake Forest Baptist in Winston-Salem, North Carolina. “When you’re trying to manage migraine, what you eat — and when you eat — can make all the difference,” she says.

Being open to change in your diet is a good start, says Dr. Brown. “Often, we can get in a rut and eat the same things over and over. By adding different fresh fruits and vegetables to our diet, we can reap benefits in terms of water content as well as vitamins and minerals,” she says.

A diet with a variety of good foods will make a big difference both in migraine management and overall health and may improve imbalances that contribute to headaches, says Brown.

If you’re looking for ways to include foods in your diet to better manage your migraine, here are some expert tips on the foods and drinks to help you on your journey.

1

Bananas Give You Energy When You Need It

Foods-to-Help-Get-Rid-of-a-Headache-or-Migraine-Attack-Naturally-01-1440x810
Catherine Falls/Getty Images

Looking for a quick and easy snack that could help stave off a migraine attack or an episode of hypoglycemia, which could lead to a headache? Reach for a banana rather than highly processed foods like granola bars or candy, suggests Brown.

“Bananas are a great food for quick energy recovery, and they’re high in magnesium, which can be helpful when people have headaches,” she says.

Bananas are about 74 percent water, so there are hydration benefits as well, Brown says.

2

Watermelon Provides Fluids to Keep You Hydrated

Foods-to-Help-Get-Rid-of-a-Headache-or-Migraine-Attack-Naturally-02-1440x810
Mongkol Nitirojsakul/Getty Images

Interesting fact: Watermelon is actually considered a vegetable because of the way it’s grown, although some people would argue it belongs firmly in the fruit category because of its sweet flavor and higher sugar content.

Watermelon also has (surprise!) a lot of water in it. It’s actually 92 percent water, according to the National Watermelon Promotion Board. Getting plenty of water — both by drinking it and by consuming foods that contain lots of water — will help you stay hydrated.

Getting enough fluids is important for all aspects of health, including migraine, says Brown. About one in three people with migraine say dehydration is a trigger, according to the American Migraine Foundation.

“Many fruits and vegetables can have a hydrating effect, and the fresher it is, the higher the water content,” says Brown.

RELATED: 8 Foods High in Water That Can Help Prevent Dehydration

3

Seeds and Nuts Provide Magnesium and Fiber

Foods-to-Help-Get-Rid-of-a-Headache-or-Migraine-Attack-Naturally-03-1440x810
Alex Ortega/Getty Images

Magnesium deficiency is one of the most common nutritional causes of persistent or cluster headaches, says Sarah Thomsen Ferreira, RD, MPH, a registered dietitian with Cleveland Clinic’s Center for Functional Medicine in Ohio.

“Prioritizing ample amounts of magnesium-rich foods daily is one of the best ways to keep these headaches at bay,” Ferreira says.

Flaxseed, sprouted pumpkin seeds, and chia seeds are all good sources of magnesium, says Ferreira. Pumpkin seeds are also high in fiber, according to the U.S. Department of Agriculture, preventing the constipation that sometimes comes with migraine. Cashews are high in magnesium, too, she says.

Graphic illustration Eat These Foods When You Have a Headache, including illustrations with descriptions including, bananas, dark chocolate, spinach, herbal teas, watermelon, strawberries, Everyday Health logo located bottom left
Everyday Health
4

Herbal Teas Have Multiple Headache Benefits

Foods-to-Help-Get-Rid-of-a-Headache-or-Migraine-Attack-Naturally-04-1440x810
Sam Burnett/Getty Images

Tea can help with overall hydration, which in itself can prevent or relieve a headache, and depending on the type of tea, there are other benefits as well, according to Brown.

“Peppermint can be effective in relieving sinus pressure,” says Brown. Sinus congestion and pressure are common symptoms of a sinus headache, brought on by inflammation and swelling of the sinuses, according to the American Migraine Foundation.

“Peppermint oil is used as an essential oil for a headache or migraine. You could put peppermint oil or fresh peppermint in a cup of hot water and inhale the steam and also drink the liquid,” says Brown.

One study found that a drop of diluted peppermint oil dripped into the nose was effective in decreasing the intensity of headaches caused by migraine in about 42 percent of participants who tried it.

There is some evidence that ginger tea can help with a tension headache, according to Brown.

Another study found that drinking a half teaspoon of powdered ginger in warm water helped reduce migraine severity.

5

Coffee Can Stop a Headache — or Cause One

Foods-to-Help-Get-Rid-of-a-Headache-or-Migraine-Attack-Naturally-05-1440x810
iStock

Coffee contains caffeine, which is added to some types of headache medications. But you can get too much of a good thing; coffee may lead to “caffeine rebound” or a caffeine withdrawal headache, according to the National Headache Foundation.

A cup of coffee is a quick fix for this type of headache, says Brown. “It’s important to remember that caffeine can stay in your system for up to five hours,” she says. For some people, this may lead to an afternoon headache once their morning cup of coffee wears off, she adds.

If your caffeine consumption is causing withdrawal headaches, you might try cutting down by drinking “half caff” or decaffeinated coffee, suggests Brown. “Even decaf coffee has some caffeine in it,” she adds.

6

Chocolate Can Ease a Caffeine Withdrawal Headache

Foods-to-Help-Get-Rid-of-a-Headache-or-Migraine-Attack-Naturally-06-1440x810
iStock

Everyone wants to hear that chocolate can help a caffeine withdrawal headache, says Brown with a laugh. “Some people believe chocolate is a food group all its own,” she says.

According to ConsumerLab.com, an independent company that tests health and nutrition products, most dark chocolates have about 40 to 50 milligrams of caffeine per 1½ ounce serving, which is about the same amount you would get in a cup of green tea and about half the amount in a cup of regular brewed coffee. So depending on the person, a serving of dark chocolate might be enough to ease a caffeine withdrawal headache.

Dark chocolate is also a good source of magnesium, according to the Cleveland Clinic.

7

Berries May Relieve Sinus Pressure

Foods-to-Help-Get-Rid-of-a-Headache-or-Migraine-Attack-Naturally-07-1440x810
iStock

“Eating things that are high in antioxidants can help to relieve sinus pressure over time,” says Brown. Blueberries, strawberries, blackberries, and raspberries are all good choices.

Smaller fruits tend to have more exposure to pesticides, and so Brown recommends getting organic berries whenever possible.

8

Mushrooms May Improve Gut Health and Prevent Migraine

Foods-to-Help-Get-Rid-of-a-Headache-or-Migraine-Attack-Naturally-08-1440x810
Linda Raymond/iStock

Sometimes people develop headaches because they have either absorption issues in their lower intestine or leaky gut, also known as increased intestinal permeability, says Brown. “Adding foods that are high in riboflavin (also known as B2) such as mushrooms, quinoa, nuts, and eggs help with that,” she says.

There is research to suggest that riboflavin may help in preventing migraines. The Quality Standards Subcommittee of the American Academy of Neurology and the American Headache Society concluded that riboflavin is “probably effective” for preventing migraine headaches.

RELATED: 8 Surprising Health Benefits of B Vitamins

9

Yogurt Hydrates and May Improve Gut Health

Foods-to-Help-Get-Rid-of-a-Headache-or-Migraine-Attack-Naturally-09-1440x810
iStock

Many people with migraine experience gastrointestinal symptoms, including constipation. “Dehydration can contribute to headaches and constipation,” says Brown.

Plain yogurt is a probiotic food that can address both issues by promoting gut health and as a source of hydration, she says.

Brown suggests choosing almond or cashew yogurt. “For some people, dairy products can intensify sinus pressure and headaches,” she says.

RELATED: 9 Ways to Eat More Probiotics Every Day

10

Broccoli May Help Prevent Menstrual Migraine

Foods-to-Help-Get-Rid-of-a-Headache-or-Migraine-Attack-Naturally-10-1440x810
Enrique Díaz/Getty Images

Changes in hormone levels can lead to headaches, especially for women with menstrual migraine or headaches, says Brown. Falling levels of estrogen, which occur just before menstruation begins, can trigger an attack, according to the Migraine Research Foundation.

Women who have this type of migraine would benefit from increasing their intake of cruciferous vegetables, because of their effects on estrogen, Brown says.

Cruciferous vegetables contain hormonally active compounds called phytoestrogens, which can have estrogenic, or estrogen-like, effects in humans — or, conversely, antiestrogenic effects. It’s thought that the antiestrogenic effects of some phytoestrogens may lower a woman’s risk of certain types of cancer by lowering her exposure to her own estrogen.

Some research indicates phytoestrogens improve bone mineral density and markers of cardiovascular risk in postmenopausal women — effects that estrogen would be expected to have in premenopausal women.

There’s also some evidence that phytoestrogens help to prevent menstrual migraine attacks in premenopausal women.

“Broccoli, Brussels sprouts, bok choy — those can all be very helpful if you include more of them in your diet,” says Brown.

11

Spinach and Swiss Chard Are Sources of Magnesium

Foods-to-Help-Get-Rid-of-a-Headache-or-Migraine-Attack-Naturally-11-1440x810
Susanne Alfredsson/Getty Images

Spinach, Swiss chard, and other leafy greens are great sources of magnesium, which can decrease or even prevent migraine in some cases, says Brown.

Several studies have found that many people with migraine have low brain magnesium levels, according to the American Migraine Foundation, and many people with migraine take magnesium supplements in addition to their migraine medications.

According to remarks made by Belinda Savage-Edwards, MD, a neurologist in Huntsville, Alabama, at the Migraine World Summit, supplements should supplement the food you eat, not replace it, and a wide variety of healthy foods provide magnesium.

It’s important to check with your doctor before going on any type of supplement for migraine or any other health condition.

RELATED: 8 Foods High in Magnesium

12

Black Beans Help Keep Blood Glucose Levels Stable

Foods-to-Help-Get-Rid-of-a-Headache-or-Migraine-Attack-Naturally-12-1440x810
Getty Images

Reactive hypoglycemia, meaning a decrease in blood sugar after eating dependent on the type of foods consumed, can lead to headaches, says Ferreira. If your headaches worsen after long periods without food or begin shortly after meals, she suggests switching to carbohydrates that will keep your blood sugar levels more stable.

“Carbohydrate types that can help with more stable blood sugar include black beans, squash, quinoa, or root vegetables,” says Ferreira.

Such foods have a low glycemic load, meaning that a typical portion of the food raises blood glucose levels a small to moderate amount. In contrast, foods such as white rice and highly processed breakfast cereals tend to raise blood glucose levels more and faster.

EDITORIAL SOURCES
Everyday Health follows strict sourcing guidelines to ensure the accuracy of its content, outlined in our editorial policy. We use only trustworthy sources, including peer-reviewed studies, board-certified medical experts, patients with lived experience, and information from top institutions.
Additional Sources
  • Nutrition Facts and Health Benefits of Watermelon. Watermelon.org.
  • Top 10 Migraine Triggers and How to Deal With Them. American Migraine Foundation. July 27, 2017.
  • Seeds, Pumpkin and Squash Seeds, Whole, Roasted, Without Salt. U.S. Department of Agriculture. April 1, 2019.
  • Is It Migraine or Sinus Headache? American Migraine Foundation. June 21, 2021.
  • Rafieian-Kopaei M, Hasanpour-Dehkordi A, Lorigooini Z, et al. Comparing the Effect of Intranasal Lidocaine 4% With Peppermint Essential Oil Drop 1.5% on Migraine Attacks: A Double-Blind Clinical Trial. International Journal of Preventive Medicine. July 5, 2019.
  • Maghbooli M, Golipour F, Moghimi Esfandabadi A, Yousefi M. Comparison Between the Efficacy of Ginger and Sumatriptan in the Ablative Treatment of the Common Migraine. Phytotherapy Research. March 2014.
  • Does Caffeine Trigger or Treat Headaches? National Headache Foundation.
  • How Much Caffeine Is Really in Dark Chocolate Bars? ConsumerLab.com. August 3, 2017.
  • Magnesium Rich Food. Cleveland Clinic. November 24, 2020.
  • Holland S, Silberstein SD, Freitag F, et al. Evidence-Based Guideline Update: NSAIDs and Other Complementary Treatments for Episodic Migraine Prevention in Adults: Report of the Quality Standards Subcommittee of the American Academy of Neurology and the American Headache Society. Neurology. April 24, 2012.
  • Menstrual Migraine Treatment and Prevention. American Migraine Foundation. November 5, 2021.
  • Rowe IJ, Baber RJ. The Effects of Phytoestrogens on Postmenopausal Health. Climacteric. February 2021.
  • Allais G, Castagnoli Gabellari I, Burzio C, et al. Premenstrual Syndrome and Migraine. Neurological Sciences. May 2012.
  • Magnesium and Migraine. American Migraine Foundation. October 20, 2021.

Most Recent in Migraine

How to Break the Migraine Attack Cycle
How to Break the Migraine Attack Cycle
migraineHow to Break the Migraine Attack CycleMedically Reviewed by Jessica Baity, MD | January 28, 2026
4 Ways to Make the Most of Each Migraine Checkup
4 Ways to Make the Most of Each Migraine Checkup
migraine4 Ways to Make the Most of Each Migraine CheckupMedically Reviewed by Huma Sheikh, MD | January 28, 2026
5 Risks of Taking Too Much Excedrin
5 Risks of Taking Too Much Excedrin
migraine5 Risks of Taking Too Much ExcedrinMedically Reviewed by Kristina D. Carter, PharmD | December 2, 2025
The 8 Best Resources of 2025 for People Living With Migraine and Headache
The 8 Best Resources of 2025 for People Living With Migraine and Headache
migraineThe 8 Best Resources of 2025 for People Living With Migraine and HeadacheMedically Reviewed by Mark Youssef, MD, MA, MFA | December 1, 2025
Meet Our Experts
See Our Editorial PolicyMeet Our Health Expert Network
Jessica-Baity-bio

Jessica Baity, MD

Medical Reviewer
Castle Connolly Top Doctor

Jessica Baity, MD, is a board-certified neurologist practicing in southern Louisiana. She cares for a variety of patients in all fields of neurology, including epilepsy, headache, dementia, movement disorders, multiple sclerosis, and stroke.

She received a bachelor's degree in international studies and history from the University of Miami and a master's in international relations from American University. She graduated from the Louisiana State University School of Medicine, where she also did her internship in internal medicine and her residency in neurology.

Prior to practicing medicine, she worked in international relations and owned a foreign language instruction and translation company. 

See full bio
Becky Upham, MA

Becky Upham

Author

Becky Upham has worked throughout the health and wellness world for over 25 years. She's been a race director, a team recruiter for the Leukemia and Lymphoma Society, a salesperson for a major pharmaceutical company, a blogger for Moogfest, a communications manager for Mission Health, a fitness instructor, and a health coach.

Upham majored in English at the University of North Carolina and has a master's in English writing from Hollins University.

Upham enjoys teaching cycling classes, running, reading fiction, and making playlists.

See full bio
See Our Editorial PolicyMeet Our Health Expert Network
Healthy Living
Sign up for our Healthy Living Newsletter!
By subscribing you agree to the Terms of Use and Privacy Policy.
RELATED ARTICLES
See all in Migraine
How Much Control Do You Really Have Over Migraine Triggers?
How Much Control Do You Really Have Over Migraine Triggers?
MigraineHow Much Control Do You Really Have Over Migraine Triggers?Medically Reviewed by Shamin Masrour, DO | Feb 23, 2026
How to Break the Migraine Attack Cycle
sugar-free electrolyte water, medication, sleep mask
MigraineHow to Break the Migraine Attack CycleMedically Reviewed by Jessica Baity, MD | Jan 28, 2026
Tea-Induced Migraine Explained: Ingredients That Trigger Migraine Attacks
ginseng tea
MigraineTea-Induced Migraine Explained: Ingredients That Trigger Migraine AttacksMedically Reviewed by Mark Youssef, MD, MA, MFA | Oct 29, 2025
Migraine Treatment: A Complete Guide
prescription drugs, Botox, ice packs, infusions
MigraineMigraine Treatment: A Complete GuideMedically Reviewed by Jason Paul Chua, MD, PhD | Sep 02, 2025
What Cheese Can People With Migraine Eat?
White plate with variety of cheeses
MigraineWhat Cheese Can People With Migraine Eat?Medically Reviewed by Jessica Baity, MD | Aug 06, 2025
How Body Weight Affects Migraine: Prevention and Care Strategies
woman stepping onto a scale
MigraineHow Body Weight Affects Migraine: Prevention and Care StrategiesMedically Reviewed by Michael Yang, MD | Apr 10, 2025
A Fish a Day May Keep the Migraine Away
salmon meal kit eating at work
MigraineA Fish a Day May Keep the Migraine AwayMedically Reviewed by Michael Yang, MD | Apr 09, 2025
This Is Your Body on Migraine
This Is Your Body on Migraine
MigraineThis Is Your Body on MigraineMedically Reviewed by Jessica Baity, MD | Jun 12, 2024
9 Migraine Diet Dos and Don’ts
migraine diet
Migraine9 Migraine Diet Dos and Don’tsMedically Reviewed by Jason Paul Chua, MD, PhD | Nov 17, 2023
9 Things People With Migraine Want You to Know
migraine can be isolating
Migraine9 Things People With Migraine Want You to KnowMedically Reviewed by Jason Paul Chua, MD, PhD | Nov 15, 2023
9 Foods That Can Trigger a Migraine Attack
avocados, red wine, aged cheeses, spicy foods all migraine triggers
Migraine9 Foods That Can Trigger a Migraine AttackMedically Reviewed by Jason Paul Chua, MD, PhD | Nov 08, 2023
9 Tips for Migraine and Headache Prevention
regular meal schedule, medication, regular exercise, and sleep can all help prevent migraine
Migraine9 Tips for Migraine and Headache PreventionMedically Reviewed by Jessica Baity, MD | Sep 14, 2023
8 Things You Need to Know About the Keto Diet and Migraine
eggs bacon avocado on pink plate
Migraine8 Things You Need to Know About the Keto Diet and MigraineMedically Reviewed by Jessica Baity, MD | Jul 03, 2023
15 Migraine Triggers You Should Know About
migraine triggers
Migraine15 Migraine Triggers You Should Know AboutMedically Reviewed by Jason Paul Chua, MD, PhD | Jun 15, 2023
6 Sleep Tips for People With Migraine
a woman sleeping in bed
Migraine6 Sleep Tips for People With MigraineMedically Reviewed by Jason Paul Chua, MD, PhD | Jun 05, 2023
10 Ways to Stop Migraine Before It Starts
10 Ways to Stop Migraine Before It Starts
Migraine10 Ways to Stop Migraine Before It StartsMedically Reviewed by Jessica Baity, MD | Jun 04, 2023
5 Myths About Chronic Migraine, Debunked
abstract brain illustration
Migraine5 Myths About Chronic Migraine, DebunkedMedically Reviewed by Jason Paul Chua, MD, PhD | May 26, 2023
Home Remedies for Headache and Migraine Relief
home-remedies-for-headaches-and-migraines-01-alt-1440x810
MigraineHome Remedies for Headache and Migraine ReliefMedically Reviewed by Jessica Baity, MD | Apr 14, 2023
What Is Migraine? Symptoms, Causes, Diagnosis, Treatment, and Prevention
Migraine
MigraineWhat Is Migraine? Symptoms, Causes, Diagnosis, Treatment, and PreventionMedically Reviewed by Jason Paul Chua, MD, PhD | Mar 30, 2023
7 Tips to Ease Migraine Pain
woman holding ice pack on neck
Migraine7 Tips to Ease Migraine PainMedically Reviewed by Jason Paul Chua, MD, PhD | Dec 30, 2022
Wellness inspired. Wellness enabled.
A PROPERTY OFEveryday Health GroupEHGLogo
  • About Us
  • Privacy Policy
  • Editorial Policy
  • Terms of Use
  • Meet Our Health Expert Network
  • Consumer Health Data Privacy Policy
  • Careers
  • Accessibility Statement
  • Do Not Sell My Personal Information
  • Contact Us
  • Press Center
  • All Health Topics
  • Popular Topics
  • Drugs & Supplements
  • AdChoices
NEWSLETTERS
Get the best in health and wellness
By subscribing you agree to the Terms of Use and Privacy Policy.
© 1996-2026 Everyday Health, Inc., a Ziff Davis company. All rights reserved. Everyday Health is among the federally registered trademarks of Everyday Health, Inc. and may not be used by third parties without explicit permission.All information on the Everyday Health website is for informational purposes only, and is not intended to be used for medical advice, diagnosis, or treatment. For more details, see Everyday Health's Terms of Use.
TRUSTe Verified PrivacyBadges