If only heading to the mountains for vacation didn’t mean battling altitude sickness! The debilitating symptoms—headache, fatigue, dizziness, nausea, vomiting, breathlessness, sleep disturbances—though short-lived, spell misery for more than 25% of travelers who visit altitudes above 8,000 feet.

Medications commonly used to treat the ailment, also called “acute mountain sickness,” include the diuretic acetazolamide (Diamox) and the corticosteroid dexamethasone. But these require prescriptions and may cause side effects (nausea, dizziness, insomnia, delirium) that are as debilitating as altitude sickness itself.

Good news from a recent study: Ibuprofen (Advil, Motrin), which is sold over the counter for mild-to-moderate pain, fever and inflammation, may help travelers acclimate better to higher elevations. The study involved 86 participants who lived at low altitudes and were making their way up California’s White Mountains by driving and hiking to a final altitude of 12,570 feet. One group received placebos. The other group received four 600-mg doses of ibuprofen—one dose at 8 am (six hours before beginning their ascent)…the second and third doses at 2 pm and 8 pm…and the final dose at 8 am the next morning, after spending the night on the mountain. Results: 69% of placebo users developed symptoms of altitude sickness, compared with only 43% of ibuprofen users—which means that ibuprofen decreased the odds of developing the ailment by one-third.

Why the drug helps: Though the jury’s still out on the exact cause of acute mountain sickness, researchers believe inflammation plays a role…and ibuprofen is an anti-inflammatory. (This study did not look at other types of nonsteroidal anti-inflammatory drugs as possible preventive approaches to altitude sickness.)

Heading for the high hills? If you want to try replicating this study’s results, researchers suggested taking 600 mg of ibuprofen six hours before starting your ascent, then three more 600-mg doses every six hours after that (unless you’re asleep, in which case you can take the next dose when you wake up). Do not exceed four doses in total. Ibuprofen typically is well-tolerated, but it can cause gastrointestinal and/or kidney problems, especially if you’re dehydrated—so be sure to drink plenty of water, too. Important: If you do develop symptoms of acute mountain sickness, descend to a lower altitude as soon as possible to prevent potentially life-threatening swelling in the brain.