The first line of defense that most people have against sweat -- during the day or at night -- is antiperspirants. The function of most antiperspirants is to slow down the production of sweat, and they do that by blocking the underarm glands that secrete it. Aluminum ions usually give deodorants their antiperspirant power, and they do that by entering skin cells and causing the glands to shrink and close, preventing sweat from leaving.
Of course, you don't want to rub antiperspirant/deodorant all over your body. For more serious cases of hyperhidrosis and night sweats, doctors often prescribe medicines like Drysol. Like a typical over-the-counter antiperspirant, the active ingredient in Drysol is aluminum, but it contains higher concentrations. Drysol is applied topically to problem areas, like the armpits, feet, hands and other parts of the body that produce a lot of sweat [source: Drugstore.com]. The problem with topical antiperspirants that contain aluminum chloride is that they can often cause skin irritation, causing people to stop the treatment [source: Emedicine].
For people with hyperhidrosis, some doctors also prescribe Robinul (glycopyrrolate), which prevents the secretion of various fluids in the body. In recent years, it has been revealed that injections of botulinum toxin, or Botox, can provide relief for excessive sweating. In 2004, the FDA approved the use of Botox to treat excessive underarm sweating, and it's sometimes used on other parts of the body, like the hands, as well. In some very extreme cases, surgery has been prescribed for treatment of hyperhidrosis, in which surgeons make incisions in the armpits and other problem areas.
Most people who suffer from night sweats won't end up going under the knife -- those are very extreme cases of a serious disease. Most people who experience night sweats have them only sporadically, and in many cases, making minor changes to your sleeping environment can cure them.
For some useful links and lots more information about sweating at night, read on.