Scientists mostly agree that acute mountain sickness (AMS) is caused by hypoxia at high altitude and a failure to adapt to that hypoxia (hence occurring more rapidly at rapid ascent cause of less time for adaptation). Hypoxia leads to hyperventilation that causes respiratory alkalosis. This respiratory alkalosis limits the rise in ventilation rate and lead to symptoms of acute mountain sickness
Carbonic anhydrase inhibitors like Acetazolamide by inhibiting carbonic anhydrase in the choroid plexus, causes decreases secretion of bicarbonate into the CSF, thereby causing decreased pH of the CSF (CSF acidosis). There is also generalized metabolic acidosis due to excess loss of bicarbonate from the kidneys.
This MAINTAINS hyperventilation that is useful in mountain sickness, because normally hyperventilation produced without acetazolamide leads to respiratory alkalosis; By giving acetazolamide, it causes metabolic acidosis; Metabolic acidosis attenuates the inhibitory effects of hypoxia-induced respiratory alkalosis; so that now increase in ventilation is not limited-metabolic acidosis balances the respiratory alkalosis

For more details and other useful information on Pharmacology

Read ‘Nauman’s Textbook of Pharmacology’ (3rd Edition)

For many more MCQs (4500 MCQs) divided into units, chapters, and topics read:

‘Learning Pharmacology from Nauman’s MCQS’