However, become too reliant on your tea or java and you risk rebound or withdrawal headaches when you come down from your caffeinated “high.” These are likely if you’re consuming 500 milligrams or more of caffeine a day, according to Everyday Health, about the equivalent of five cups of coffee.

6: Honorable Mention: Almonds

A small body of research has examined the importance of magnesium when it comes to treating migraines, without many concrete findings. The authors of a 2012 comment published in the Journal of Neural Transmission write that while magnesium seems to offer some potential in migraine prevention, there’s little to suggest it would help mid-headache. Because it’s relatively safe, they don’t caution against it, but merely warn there’s not enough evidence yet to assume all headache sufferers will benefit. Should you opt to go the magnesium route, almonds are a good bet, with 80 milligrams per serving.