There are enough metaphoric "headaches" when flying: missed connections, delays, long security lines. So the last thing you need is an actual airplane headache—a.k.a. "aviation headache"—which can be caused by the change in altitude as a plane ascends and descends.

Why does this happen? Known as aerosinusitis, the inflammation in the paranasal sinus cavities (those are the air-filled spaces that stem from the sides of your nose to between your eyebrows) is caused by a difference in air pressures inside and outside the body. And that difference in pressure may cause blood vessels in the body to dilate, which can lead to head pain. Migraines can also be triggered during air travel due to a variety of factors, including stress, dehydration, dry recirculated air, strong odors, and weather changes.
So how can you avoid a throbbing head on your next flight? 
Follow these steps:

TAKE IBUPROFEN BEFORE YOU BOARD

If you know you're prone to aviation headaches, take a non-steroidal anti-inflammatory agent (i.e. ibuprofen) one to two hours before takeoff to get ahead of any inflammation or pain. Otherwise, board as usual, and if you do feel a headache coming on, waste no time popping a dose—which will hopefully prevent that throbbing feeling from getting worse. Suggestion: Keep a small bottle of ibuprofen with you in your carry-on; that way, you know it's there if you need it (and you don't have to flag down a flight attendant to see if he or she has any pills in the galley).

SKIP TRIGGERING FOODS

Within 12-24 hours of your flight, pass on the red wine, aged cheeses, chocolate, and processed meats, all of which contain tyramine, a chemical compound that can signal pain pathways for those with a predisposition to headaches and migraines, says Dr. Monteith. Instead, try sticking to a natural plant-based diet just before and while you're traveling, which will not only help you avoid the potentially ache-inducing triggers, but also could also give you more energy so you don't feel sluggish before you board.

AVOID DARK ALCOHOLS AND SUGARY DRINKS

This one's a no-brainer: You already know to drink lots of water during flights to prevent dehydration. For the same reason, you should limit excessive amounts of coffee, alcoholic, and sugary drinks just before and during your flight. If you really need an adult beverage to calm your nerves, stick to clear liquors (like gin and vodka), which typically trigger less head discomfort than wine, beer, or fizzy cocktails. Why? Clear liquors contain fewer or no “congeners,” byproducts that form during fermentation that can be difficult for the body to break down. There is one exception to this rule, however: Some people find that caffeine helps ward off migraines, and so if you feel one coming on, a swig of coffee might help. (But still, keep chugging that water.)

WARD OFF MOTION SICKNESS

Turbulence can do more than mess with your nerves—it can also make you queasy, which can trigger a migraine. Keep motion sickness medication in your carry-on as well if you're sensitive to movement, and you might save yourself from a stomachache and headache.

PACK YOUR SLEEP GEAR

“Good sleep, possibly with the use of melatonin [if necessary], may be beneficial as alterations in sleep habit and jet lag can be migraine triggering, as well,” says Dr. Monteith. It certainly helps to get a proper rest the night before a flight, but for long hauls, it's just as important to sleep on the plane. Be sure, especially if you're flying a red-eye, to wear comfortable clothes and bring proper travel sleepwear—including an eye mask, ear plugs, and comfy socks—to have the best possible (and headache-free) trip.