Even in ancient times people associated excessive alcohol with sleep, although both anecdotal and scientific evidence shows alcohol-induced sleep tends to be poor quality. Herbs may have been used as "sleeping potions", a kind of folk medicine and folklore. Smoked opium also put people to sleep although this drug was more often taken for its euphoric side effects than as an insomnia cure.
The second scientific revolution and the beginnings of formal chemistry brought discovery of drugs that could knock out people. Ether (diethyl ether) was an early anesthetic in the nineteenth century and often abused, although rarely administered by doctors for insomnia. Choral hydrate was probably the earliest drug used for insomnia in clinical sense. Sodium bromide, potassium bromide, and ammonium bromide were depressants sometimes used for severe sleep problems. Paraldehyde and sulphonal were prescribed by doctors of the era. Morphine (derived from opium) was used as an anesthetic and pain reliever and for recreational and sleep purposes in the Nineteenth Century. Cannabis was prescribed to Queen Victoria; her doctor wrote that it was to help her sleep when she had menstrual cramps.
Barbituates (the salts of barbituric acid) saw widespread use in the first half of the Twentieth Century. Barbital entered medicine in 1903; phenobarbital in 1912. Dozens of Barbiturates were employed by doctors, often promiscuously. Barbiturates were used to help people sleep, to treat anxiety, to help control socially unruly people, and for many psychiatric conditions. Patients often got addicted, and sometimes overdosed. It became widely known that swallowing a bottle of sleeping pills was a way to commit suicide.
These were drugs that movie stars notoriously took to sleep and they also found use in wider society and notice in pop culture as they were called “downers” and often used and abused without a doctor’s prescription. The Jacqueline Susann book Valley of the Dolls was about people who used "dolls" which were Barbiturates. The Rolling Stones recorded a song called Mother’s Little Helper in which the “helper” through the day was a yellow pill. There are different opinions about which particular drug the lyrics referred to – some feel it was a barbiturate while others think it was the benzodiazepine Valium or an amphetamine.
Today barbiturates are used mostly by anesthesiologists in a hospital setting.
The 1960s saw the rise of benzodiazepines, or more accurately benzodiazepines receptor agonists. Diazepam (sold under the name Valium) was developed in 1963 Valium was the most prescribed drug in the US between 1969 and 1982.
More than Barbiturates and more than modern sleeping pills, benzodiazepines are known for treating anxiety, panic attacks, and to relax muscles. They do help people sleep and the fact that they were safer than Barbiturates led doctors to prescribe them for insomnia. Overdose, although possible, does not usually result in coma or death unless the patient is given another drug that affects respiration. Benzodiazepines are widely used for treatment of anxiety, insomnia, and epilepsy. Their use for insomnia has declined better drugs with fewer side effects have been introduced.
(The slang term “bennie” meant Benzedrine: a form of amphetamine, which people used recreationally. too. In a sense amphetamines were the opposite of Barbiturates. They were “uppers”. Bennie did not refer to benzodiazepines in any meaningful way in pop culture, as near as we can tell.)
Up to this time, all effective sleeping pills were prescription drugs. That is, no drug available over-the-counter was "labeled" by the FDA for insomnia. In the late 1970s and early 1980s the FDA approved antihistamines for OTC sleep aids. Antihistamines had been used as prescription sleep aids since the 1940s.
The 1990s saw the introduction of new prescription drugs specifically for insomnia. Like the benzodiazepines these were GABA-agonists, but they had a different chemical structure, a shorter half-life in the body, and generally fewer side effects for sleep disorder patients. The medical community started calling these "non-benzodiazepines". We like the term Z-drugs.
Including such drugs as zaleplon (Sonata) and zolpidem (Ambien). These are still today the dominant prescription sleep aids on the market.
In the 2000s the drug company Serpacor introduced eszopiclone under the name Lunesta. One of the chiral forms of the Z-drug zopliclone (which had gone generic), eszopiclone was approved by the FDA for use longer than previous drugs.
Investment analysts anticipated a boom in the insomnia drug market because patients could take them longer and because such drugs as indiplon and ramelteon were coming out. Which was great for the pharmaceutical industry, although some doctors were dubious. The excitement faded somewhat, especially after indiplon washed out and the boom in insomnia prescriptions was less than some hoped.
In addition to new chemicals, pharmaceutical companies are working on ways to repackage and reformulate old drugs for more officious delivery. Somaxon brought out a new formulation of the old tricyclic antidepressant doxepine under the name Silenor. Doxepine apparently can act as a histamine antagonist. Circadin is a special formulation of the hormone melatonin, which can be purchased generically; the makers say their preparation is a better way to deliver the chemical to the body.