What’s the first thing you do when you have a headache? Perhaps you lie down or reach for an over-the-counter pain reliever. However, if those techniques don’t work, you may want to look inside your refrigerator or pantry for specific foods.
“The most important thing I tell patients is that migraines are highly individualized,” says Dr. Nicholas Church, a board-certified member of the American Board of Family Medicine and the American Academy of Family Physicians. “What helps one person may not help another, and what’s a trigger for one might be therapeutic for someone else.”
While no one food will act as a cure-all for headaches — and managing your sleep, hydration, exercise and stress are equally important — experts say the following foods could help you cope with headaches in the future.
1. Omega-3-rich foods, like salmon
“I recommend omega-3-rich fish, such as salmon, mackerel and sardines,” says Church. “These fish are high in anti-inflammatory fats (EPA and DHA), which can reduce inflammation throughout the body, including in the vascular system and brain.”
Citing a 2021 randomized controlled trial, Church explains that because migraines are believed to involve inflammatory and vascular changes in the body, omega-3 fatty acids may help reduce their frequency or intensity when eaten regularly. “The study’s findings also align with earlier data showing that omega-3s help regulate prostaglandins, which play a role in headache inflammation,” says Church. Prostaglandins are hormone-like substances that impact bodily functions such as inflammation, pain and menstrual cramps.
Fatty fish also contain vitamin D, coenzyme Q10 and B vitamins including riboflavin, which support healthy brain metabolism.
Kiran Campbell, a registered dietitian nutritionist at MyNetDiary, also mentions a 2024 meta-analysis revealing that omega-3 fatty acids can reduce the frequency, duration and severity of migraines. She adds that plant-based sources include chia seeds, walnuts, flaxseed and algae oil.
Example foods: Salmon, mackerel, sardines, chia seeds, walnuts, flaxseed and algae oil
Ginger tea combines the benefits of ginger with the hydration of water.
4. Nuts and seeds, like almonds
“Another group of foods I recommend are nuts and seeds, including almonds, pumpkin seeds, sunflower seeds and walnuts,” Church states. “Like leafy greens, these are rich in magnesium, and some also provide vitamin E, which has been shown to help with menstrual migraines and migraines with aura.” A 2015 study reflected this.
Example foods: Almonds, pumpkin seeds, sunflower seeds and walnuts
5. Cinnamon
“Cinnamon contains a high amount of antioxidants that may also reduce headache frequency,” Campbell explains. “Stir it into your morning oatmeal or tea, or bake it into muffins and breads.” She cites a randomized, double-masked, placebo-controlled 2020 trial, stating, “Studies suggest that cinnamon supplementation may lower inflammation, cutting down on migraine frequency, severity and duration.”
When combined with omega-3s, turmeric may help with migraine headache management.
8. Whole grains, like oats
Church mentions that whole grains like quinoa, brown rice and oats may also be beneficial since they “provide a steady release of glucose, preventing blood sugar crashes that can trigger headaches, and are good sources of fiber, B vitamins and trace minerals.” He cites a 2023 cross-sectional study of 12,710 participants with data collected from a 1999-2004 National Health and Nutrition Examination Survey. It found that for every 10 grams of fiber added to the diet, there was an 11% reduction in the odds of having severe headaches or migraines.
“By providing magnesium, iron, and B vitamins, whole grains support brain health, oxygen delivery and a stable glucose supply, which are all relevant to migraine prevention,” concludes Church.
A 2023 comprehensive review also found that curcumin is a promising candidate for preventing and controlling migraines due to its anti‑inflammatory, antioxidative, anti-protein aggregate and analgesic effects. However, additional studies are needed.
Example foods: Quinoa, brown rice and oats
9. Water-rich foods, like watermelon
Dr. Kimberly Idoko, a developmental neurobiologist and board-certified neurologist, reveals that dehydration can also trigger headaches, which is why staying hydrated can significantly improve migraine treatments.
“Water-rich foods like cucumber, watermelon and citrus fruits also help you stay hydrated,” adds Church.
When it comes to caffeine, moderation is key.
Caffeine: “The most fascinating study I’ve seen on the role of nutrition in the treatment of headaches (Hering-Hanit and Gadoth, 2003) was published in Cephalalgia, the premier headache journal. Over a five-year period, doctors at a neurology clinic in Israel treated 36 children and adolescents (average age 9) with severe daily or near-daily headaches who drank an average of 11 quarts of cola drinks per week,” says Redwood. “At the end of a gradual withdrawal period (because too speedy a withdrawal can trigger even worse headaches), 33 of these 36 young people were headache-free, a truly stunning result. Nearly all cola drinks contain substantial amounts of caffeine (Chou and Bell, 2007).”
Note: 11 quarts of cola per week is extreme, and the average person doesn’t consume this much caffeine. Moderate caffeine intake is still OK, according to Amelia Ti, a registered dietitian and diabetes educator in New York City who is also part of CNET’s medical review board.
However, when it comes to caffeine, Church notes, “Caffeine, used strategically, can enhance the absorption of pain relievers and constrict dilated blood vessels in the brain, which may ease migraine pain. This is why many over-the-counter headache medications include it. Studies have shown that 40–100mg of caffeine (the amount in a small cup of coffee or strong tea) can reduce migraine or tension headache pain. But chronic overuse can lead to rebound headaches, so moderation is key.”
Added sugars and highly processed foods: “Research has shown that people following a ‘Western’ diet, which includes substantial amounts of added sugars and other highly processed foods, are at greater than average risk for developing migraines, while the risk is significantly lower than average for those following a healthier diet,” states Redwood.
Dr. Joseph Mercola, a board-certified family physician and author of Your Guide to Cellular Health, adds that in addition to incorporating foods rich in specific nutrients like magnesium and B vitamins, you’ll want to eliminate triggers like processed foods that contain nitrates, MSG, added sugars or yeast.