Pilots of unpressurized aircraft are mostly familiar, or becoming familiar, with hypoxia risks at altitude. We all know and should know that as you fly higher, there is less air density and the partial pressure of oxygen is lower. This translates into less oxygen absorption in the lungs.
There are real hypoxia risks above 8k MSL because the lower partial pressure of oxygen creates an exponential binding problem with the hemoglobin, which is activated above certain pressures to transport oxygen.
However, independent of hypoxia, is a lesser known problem of altitude sickness or decompression sickness. All of us have heard that scuba diving ascents must be slow in order to prevent a case of the bends. Or, that we shouldn't take flight after scuba diving unless we wait for more than a day.
The bends is caused by nitrogen, which is dissolved in the blood, off-gassing from the blood as the ambient pressure decreases. This is pronounced in diving with the equivalent of doubling the atmosphere in just 30 feet.
But, the same effect is realized when you half the atmosphere above 18k MSL, or go to 1/3 the atmosphere at 27k MSL. As you go higher, the nitrogen dissolved in your blood leaves as a gas.
The explanation is Boyle's law, which states that when pressure of a gas above a liquid increases, there will be an increase in gas that enters and is dissolved within the liquid. And, conversely, when pressure of a gas above the liquid decreases, the dissolved molecules will then return to the gaseous state. This is demonstrated each time we open a carbonated drink at atmospheric pressures, the carbon dioxide that was dissolved returns to a gas.
Altitude sickness is a real problem at high altitudes, because the nitrogen that was forced into the blood plasma at sea level pressures escapes to gas form. When the nitrogen gas builds up it can actually cause strokes and heart attacks, because the bubbles block blood flow. There are other problems too, like headaches, joint soreness, and cognitive declines.
Altitude sickness is mostly a problem above 18k MSL according to the FAA and military data. Contributing factors are weight, increased recent exercise, dehydration, and others.
The only solution is to wear a pressurized suit, be in a pressurized aircraft, avoid the high unpressurized altitudes. Breathing oxygen will not help because the nitrogen issue is completely unrelated to the hypoxia problem.
There are some advanced techniques of pre-breathing that can be done on the ground with 100 percent oxygen and during the climb and entirety of the flight. This can decrease the odds of altitude sickness because the nitrogen in the air, typically 80 percent, is not ever breathed. This decreases the amount of nitrogen in the plasma and the amount of nitrogen that off-gases during high altitude flight.