People sick with AMS can get worse, and may need help descending, or may not recognize that they are getting sicker. These medications will not cover up worsening symptoms. Descent is always an option, and recovery will be quite rapid. Trekkers always wonder about how to tell if a headache is due to altitude. See Golden Rule I .
Dehydration is a common cause of headache at altitude.
Drink one liter of fluid, and take some acetaminophen or one of the other analgesics listed above. This re-acidification acts as a respiratory stimulant, particularly at night, reducing or eliminating the periodic breathing pattern common at altitude. Its net effect is to accelerate acclimatization. Acetazolamide isn't a magic bullet, cure of AMS is not immediate. I do not recommend acetazolamide as a prophylactic medication, except under specific limited conditions outlined below.