There's not much you can do to prevent this problem -- though there are ways you can ease its effects. Being at a high elevation is stressful to your body. The concentration of oxygen is 21% at both sea level and at higher altitudes, but the decreasing air pressure at higher elevations means you get significantly fewer oxygen molecules per breath once you go over about 8,000 feet.
Before your trip, make an effort to hit the gym more often, or do a few extra laps at the track. This can minimize the dizziness, fatigue, shortness of breath, nausea, and headaches that signal altitude sickness. Fitness at sea level doesn't guarantee an easier time when you're 2 miles high. But being in good shape makes it more likely that your lungs will be able to cope.
Ease the body's transition to higher altitudes once your trip begins. If you're going higher than 8,000 feet, take it slow. When you arrive, try to let your body acclimate for a day or two. When hiking up to 15,000 feet or more, spread out your ascent over a period of two or three days to give your body more time to adapt. And once on your trip, watch what you eat and drink. You'll want your respiratory system operating at full capacity, so avoid alcohol and any drugs that might interfere with your breathing, such as sleeping medications.
If your symptoms are severe, a prescription drug called Diamox/acetazolamide 250mg 2-4x a day # 10 may help. It works by stimulating your breathing, so that you take faster and deeper breaths. Ideally the first dose can be taken 24-48 hours before ascent at the twice a day schedule. Alternatively, It can be taken on a plane several hours before arrival or at the airport before departure. Then, it can be taken 2-4x a day for up to the first two days (48 hours) at altitude.
However, Diamox is a powerful medication, so it's best to avoid it if you can. Side effects include increased urination and tingling of the fingers and toes; it may also make carbonated drinks taste flat. People with allergies to sulfa drugs should not take Diamox. As always, discuss any allergies with your doctor before you start any new medications. Also discuss if you are pregnant or may become pregnant.
If your symptoms become more pronounced and include severe shortness of breath, mental disorientation, or disturbed balance, return to a lower altitude immediately. The air up there just isn't for everyone.
Sleeping with your head elevated and avoid over eating though your appetite will likely be quite supressd once at altitude. Spend the first day and night after arriving at altitude resting and taking it easy to help acclimate.
Have medication in case you get a migraine headache or nausea and vomiting just in case as well. Triptans for migraine if OK with your doctor and a Phenergan/promethazine Suppository 25mg #6 1-2 per rectum every 6 hours as needed prescription might really help you out in a pinch.
Thanks to John West MD PhD for his input