“There is something called an exertional headache, which is a situation where exercise or other physical exertion can trigger a headache,” Loder said. “High altitude, or exercising for quite a while may make these headaches more likely to occur.” Some people who have migraine also find that physical exertion can trigger a migraine attack. One way to relieve pain might be to modify or switch the type of activity you’re doing. Some people also benefit frmo taking an anti-inflammatory medication about an hour before physical activity. “Most people who occasionally have had this type of headache recognize they didn’t warm up properly or had a particularly hard workout,” said Loder.