Attention migraine sufferers who rely on coffee to get through the better part of the day: A new study finds that drinking more than three cups of coffee a day is associated with the onset of a migraine within the next 24-to-36 hours. Researchers say people who suffer from episodic migraines are especially at risk.

(Related: Safest Way to Indulge in Chocolate Without Triggering a Migraine)

Women More Affected Than Men

Migraine affects about 1 in 10 people worldwide, according to recent research. It affects women roughly twice as often it does men. And, researchers say, the tendency for migraine often runs in the family.

How Coffee Amount Influences Migraine

In the recent study, scientists analyzed information from 98 adults who experience episodic migraine. (Episodic migraine is characterized by those who have up to 14 headaches days per month.)

The participants completed an electronic diary twice a day for six weeks. They reported their caffeinated beverage intake, certain lifestyle factors, and the timing and characteristics of any migraine attacks.

Researchers then compared the likelihood of migraine attacks on days the participants drank caffeinated beverages to the days they didn’t.

The findings suggest the effect of caffeinated drinks on migraine attack risk was only apparent for three or more servings on that day.

(Related: Magnesium Shown to Alleviate Headaches and Migraines)

Caffeine Can Also Cure a Migraine Attack

What’s fascinating about coffee is its ability to both cause a migraine, and cure it.

For example, when pain is caused by blood vessels in the brain swelling (a condition called vasodilation), caffeine could help by making the blood vessels constrict, reducing the swelling.

Intravenous (IV) caffeine has even been used in emergency rooms for rapid relief of severe migraine symptoms.

Caffeine also gives a boost to many headache remedies. Whether its aspirin, ibuprofen, or acetaminophen, these medications work faster, better, and keep the pain away longer when combined with caffeine.

(Related: Study: Exercise “As Good As Medication” in Preventing Migraines

The Bottom Line

If you’re prone to migraines, stick to one or two cups of coffee a day. You may also want to consider getting a thorough evaluation to determine the root cause of your migraines. Perhaps they are related to dental forces or a bite misalignment.