If you’ve ever visited mountainous regions such as Aspen, Colorado, or Machu Picchu in Peru, you might have been hit with altitude sickness, also known as acute mountain sickness (AMS). More than 25 percent of the millions of Americans who travel to high elevations each year develop AMS.

“In higher elevations, the air pressure decreases, so your lungs take in less oxygen per breath than at lower altitudes,” explains Grant S. Lipman, MD, a clinical professor of surgery/emergency medicine at Stanford University School of Medicine and co-director of the Wilderness Medicine Fellowship.

The more quickly you ascend to high elevations (considered 8,000 to 12,000 feet above sea level, or higher), the more likely you are to suffer altitude sickness. If you live at or near sea level, for instance, and travel by plane to an area considered a high elevation, your body has less time to adjust to the “thinner” air than if you ascended the mountain in stages (say going to the hotel at the base of the mountain, then waiting until the next day to go up the mountain on skis).

The initial strain on your body as it tries to adjust to the less available oxygen triggers a host of unpleasant symptoms — some of them mild, and some more severe.

If you’ve been affected by altitude sickness before, or are planning to travel to an area of high elevation, it’s important to know the signs and symptoms of altitude sickness and how to prevent and treat it.

Signs and symptoms

Some people have compared altitude sickness to feeling like you have the flu, a bad hangover or being dehydrated. You may feel fine for the first 12 hours of being in a higher elevation, then develop symptoms within 12 to 24 hours after your arrival. Symptoms generally lessen within a day or two as your body gets used to the higher elevation.

However, in more serious instances, altitude sickness can affect your lungs and brain. When your blood oxygen levels are lower, you tend to breathe faster to try to make up for the difference. As a result, you can end up with a throbbing headache and feel breathless, lightheaded and dizzy. One survey done at a Colorado ski resort at 9800 feet found that 60 percent of visitors developed a “high altitude headache.” You can also feel fatigued, nauseated (you might even vomit) and have trouble sleeping.

“If you feel disoriented or confused, have a severe headache, can't catch your breath or aren’t able to walk straight it means that your condition is more severe, and you should seek prompt medical attention,” says Lipman, author of “ The Wilderness First Aid Handbook.”

It’s rare for people to get a more severe form of altitude sickness, but if it happens, the swelling and fluid in the lungs or brain you can be at risk of serious complications, including coma or death. “It's okay to get acute mountain sickness — it is not okay to die from it,” says Lipman. Recognizing the symptoms early and seeking treatment will stop the illness from escalating to a more severe form.

Age, sex and general health don't seem to make a difference in risk for altitude sickness. “The best predictor of who will get sick is a past history of acute mountain sickness since it means that you’re susceptible,” says Lipman. “However, if you have unstable lung or heart disease, or if you're in later trimesters of pregnancy, you may be told to avoid high altitudes.”

Related: "Survivorman" Les Stroud: How to Survive Being Lost in the Wild

4 ways to prevent altitude sickness

While altitude sickness usually resolves itself within 6 to 48 hours, certain actions can hinder it. Here try these tips to avoid or quickly resolve the sickness.

Ascend slowly.The best way to prevent altitude sickness is by allowing your body time to adapt to the change in oxygen levels. "Climb to higher elevations at a slow pace to allow your body time to get in balance; a process called acclimatization,” explains Lipman. If you’re camping or hiking, try not to spend the first night too high, and once above 10,000 feet, don’t sleep more than 1,500 feet higher in elevation each night. “Also, taking a rest day every two to three nights is an important part in the acclimation process.”

Load up on carbs. In the day or two before you head to higher altitudes, your diet should include at least 70 percent carbohydrates. (Here’s your opportunity devour bread, pasta, grains and cereals without the guilt!). “If you’re flying into a high-altitude city you should also avoid large meals and alcohol or sedative sleep-aids, and try to rest once you arrive” advises Lipman.

Hydrate. According to the Institute for Altitude Medicine, in high altitudes most people need an extra liter or liter and a half on top of what they normally drink to stay hydrated.

Related:  7 Signs You Need a Drink (of Water!) 

Take an over-the-counter anti-inflammatory. According to researchers, inflammation plays a key role in altitude sickness. “I recently conducted a study on altitude sickness that showed that if people took 600 milligrams of ibuprofen, three times a day starting the morning of ascent, six hours before ascending to high elevations, their symptoms were greatly reduced and they were three times less likely to get AMS,” says Lipman. If you’re planning on going to a high altitude city such as Breckinridge or Cuzco, he says he advises an initial 600 mg dosage of ibuprofen six hours before an ascent, whether that’s flying, driving, or walking. He then says to take three more 600-mg doses every six hours after that — but to not exceed four doses in total. (Before following any medicine protocol, even with OTC medications, it’s imperative that you check with your doctor first.)

How to treat your symptoms

If you feel altitude sickness symptoms starting to develop, you shouldn’t ascend until you feel well.

“It’s fine to take some ibuprofen for a headache, hydrate, and wait to see if you just need 24 hours for your body to find its balance with the lower oxygen environment,” says Lipman. However, if you have severe symptoms, you need to move to a lower altitude as soon as possible. “Venture at least 1,500 feet lower than where you are as quickly and safely as possible. It may make a huge difference. Go to the last elevation you felt well at." Once you are acclimatized you should be able to safely and ascend again.

“Don't ascend until asymptomatic, avoid over exerting yourself, and avoid alcohol or sedative sleep aids,” advises Lipman.

People with severe altitude sickness must be taken to a lower elevation as soon as possible. Supplemental oxygen can be lifesaving in the interim and they should see a doctor as soon as possible. Treatment for fluid in the lungs (pulmonary edema) may include additional oxygen, a lung inhaler — or respirator in severe cases — and medicines like acetazolamide (Diamox), a prescription drug that increases your breathing rate so that more oxygen is taken in and you get used to higher altitude faster. Fluid in the brain (cerebral edema) may be treated with dexamethasone, a potent steroid that can help reduce swelling in the brain.

If you’ve had altitude sickness before, you can ask your doctor for acetazolamide (Diamox), but keep in mind that there are side effects that can be moderate to severe. 

Tara Rummell Berson is a health and wellness writer and editor. Her work has been featured in numerous media outlets, including Redbook, WebMD and The Huffington Post.