Polywater is a form of water that features a polymerized molecule, or a very long and complex molecule. Polywater was believed to have been initially discovered in the Soviet Union in the 20th century, but was discredited by the scientific community a few years later as illusory when others were unable to recreate the substance. Several hundred years later, it was proven that polywater did in fact exist.
In the 23rd century, the existence of polywater was finally proven. Dr. Leonard McCoy found that in the gravitational conditions brought about by the collapse of the planet Psi 2000 that water was transmuted into a form of polywater. Transmitted by perspiration, the polywater acted like alcohol on the brain - but the intoxication was much more extreme than that generally experienced with alcohol. Prior to Dr. McCoy's discovery, the science team on Psi 2000 all died - namely by freezing to death when the environmental controls were switched off. One person who had frozen to death had been taking a shower while fully clothed. After the people on Psi 2000 died, a landing party from the USS Enterprise spread the infection to the ship. Dr. McCoy was able to create a cure for the disease, which was stored in the computer. (TOS novelization: The Naked Time; TOS - The Janus Gate novel: Present Tense)
Nearly a century later, another strain of polywater was created on board the SS Tsiolkovsky by the gravitational effects of the collapsing star the Tsiolkovsky was studying. The resulting intoxication was so severe that the crew died from various causes - such as freezing to death when someone reset the environmental controls, or getting blown out into space when someone on the bridge opened an exterior hatch. Once again a person had been taking a shower fully clothed, and froze to death. An away team from the USS Enterprise brought the infection back to Enterprise. Commander William T. Riker remembered reading that there was another time when someone took a shower fully clothed, and mentioned this to Lieutenant Commander Data - who had quickly determined that Captain Kirk's Enterprise had once encountered a very similar set of circumstances. The records of the old Enterprise even contained a cure, but this original cure did not work. By then many of the crew were infected. It was proven that even the brains of Soong-type androids such as Data were susceptible to infection when Data became intoxicated. Dr. Beverly Crusher created a more broad based remedy, which was able to cure the infection. (TNG episode: "The Naked Now")
By the 2380s, Starfleet drill administrator Shari yn Yem had created a holographic simulation known as "The Naked Time". The simulation based on the incidents aboard the USS Enterprise, SS Tsiolkovsky, and USS Enterprise-D. In the simulation, the polywater effected the crew by having them succumb to their sexual urges. (LD episode: "I, Excretus")