A hypnotic (from Greek Hypnos, sleep), also known as a somnifacient or soporific, and commonly known as sleeping pills, are a class of psychoactive drugs whose primary function is to induce sleep and to treat insomnia (sleeplessness). Some hypnotics are also used to treat narcolepsy and hypersomnia by improving sleep at night and thereby reducing daytime sleepiness. Certain hypnotics can be used to treat non-restorative sleep and associated symptoms in conditions like fibromyalgia as well.
This group of drugs is related to sedatives. Whereas the term sedative describes drugs that serve to calm or relieve anxiety, the term hypnotic generally describes drugs whose main purpose is to initiate, sustain, or lengthen sleep. Because these two functions frequently overlap, and because drugs in this class generally produce dose-dependent effects (ranging from anxiolysis to loss of consciousness), they are often referred to collectively as sedative–hypnotic drugs.