Hypnic headaches are generally easier to manage than migraines. A little bit of caffeine before bed—about 40 to 60 mg in a tablet, or about half a cup of brewed coffee—usually prevents them without keeping people up at night, Preston says. But don’t try this without talking to your doctor first. Just be sure to mention the time of your headaches so that they are not mistaken for migraines.
Even for migraines and recurring tension headaches, however, don’t reach for the meds right away. There is evidence that lifestyle changes can help prevent headaches, especially migraines. “Twenty minutes a day of aerobic exercise actually decreases migraine frequency and severity,” Zhang says.
For many headache types, keeping consistent mealtimes, bedtimes, and wake times can help, as can making sure you’re staying hydrated by drinking plenty of water. “It sounds so basic, but it helps so much,” she says. For migraines, a neurologist can also help you identify possible triggers, such as dehydration.
In one classic study of people who experience migraines, most subjects reported at least one external factor that seemed to trigger their head pain. The most common triggers were stress, hormonal changes, fasting, weather, and sleep disturbances.
In the past, trying to avoid all potential triggers was a popular strategy. But newer research suggests that many triggers can be hard to identify and impossible to avoid.
Studies by Paul R. Martin, D. Phil., a psychologist and adjunct professor at Monash University in Australia, and others have suggested that simply adhering to a healthy lifestyle—which would naturally include avoiding triggers such as toxic odors, hunger, dehydration, lack of sleep, etc.—may actually be more effective than trying to avoid all potential triggers, such as stress and noise.
Your doctor can also help connect you with other treatment options if basic interventions are not helping. For instance, if you have tension-type headaches as well as head, neck, or shoulder problems, there is strong evidence that physical therapy can help prevent the headaches from returning. There’s more support for physical therapy than for massage, which may offer only temporary relief, Preston says.
For some people with frequent headaches, there is growing evidence that acupuncture may help prevent them, says Zhang, though more studies are needed. Research has also suggested that biofeedback—which typically uses electrical sensors on your body to make you aware of and help you control physiological processes—may reduce chronic pain in some cases, including from headaches.
Serious stress can also cause recurrent headaches. In those cases, cognitive behavioral therapy, or CBT, can help as well. Ask your doctor for a referral to a therapist who practices it.