What is Causing Your Headaches?

The most common types of headaches are tension and migraine headaches. Tension headaches strike when the muscles in the head and neck tighten. Migraines come on when supersensitive nerve endings in the brain create pain.
But what makes the muscles tense, or causes some nerve endings in the brain to become so sensitive? That’s not as well understood. Those causes of headaches can vary from person to person. But some triggers are common.
Tension headaches are often set off by:
stress
lack of sleep
fatigue
hunger
caffeine withdrawal
abrupt cessation of medications that contain caffeine, such as some pain-relieving medications like ibuprofen (Advil) or acetaminophen (Tylenol)
weather changes
food and drinks, such as chocolate; processed foods that contain monosodium glutamate (MSG); or alcohol
Many of those triggers for tension headaches—especially stress, hunger, fatigue, and lack of sleep—can also set off a migraine headache. But nailing down causes of headaches in the migraine category is a little trickier; the headaches may stem from many factors, or combinations of factors. The particular combination is specific to an individual. Potential culprits include
being around smoke
certain smells
bright light, such as sunlight, or flashing lights
foods, such as aged cheeses, avocados, bananas, chocolate, peas, pork, sour cream, nuts, peanut butter, or yogurt
alcohol
changes in estrogen levels for women
taking certain prescription medications, such as nitroglycerin (Nitrostat), prescribed for a heart condition; and estrogen, prescribed for birth control or menopausal symptoms
abrupt cessation of caffeine
abrupt cessation of medications that contain caffeine, such as some pain-relieving medications like ibuprofen (Advil) or acetaminophen (Tylenol)
food additives, such as monosodium glutamate (MSG) and nitrates (found in cured meats).
https://www.health.harvard.edu/staying-healthy/causes-of-headaches