Both conditions are caused by the combination of high altitude and low air pressure which leads to fluid leaking from the capillaries.
Acute Mountain Sickness (AMS): is the result of ascending faster than the body can adapt to Hace (High Altitude Cerebral Edema, fluid on the brain) or Hape (High Altitude Pulmonary Edema, fluid in the lungs). Both conditions are caused by the combination of high altitude and low air pressure which leads to fluid leaking from the capillaries. Initial signs of AMS are a headache, accompanied by dizziness, nausea, fainting or weakness, difficulty walking or sleeping, and confusion. Pulmonary edema at an advanced stage can be recognised by what's known as the Death Rattle, when breathing rattles at the end of each breath. This is quite literally the fluid in the lungs rumbling, and by this late stage, the sufferer is drowning.