Descend at least to the elevation where you last felt well when you woke up. Never leave someone with AMS alone. 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.