Ramelteon does not appear to speed the onset of sleep or the amount of sleep a person gets.Usage of melatonin as a treatment for insomnia in adults has increased from 0.4% between 1999 and 2000 to nearly 2.1% between 2017 and 2018. Most melatonin agonists have not been tested for longitudinal side effects. Prolonged-release melatonin may improve quality of sleep in older people with minimal side effects.Studies have also shown that children who are on the autism spectrum or have learning disabilities, attention-deficit hyperactivity disorder (ADHD) or related neurological diseases can benefit from the use of melatonin. This is because they often have trouble sleeping due to their disorders. For example, children with ADHD tend to have trouble falling asleep because of their hyperactivity and, as a result, tend to be tired during most of the day. Another cause of insomnia in children with ADHD is the use of stimulants used to treat their disorder. Children who have ADHD then, as well as the other disorders mentioned, may be given melatonin before bedtime in order to help them sleep. Benzodiazepines
The most commonly used class of hypnotics for insomnia are the benzodiazepines. : 363  Benzodiazepines are not significantly better for insomnia than antidepressants. Chronic users of hypnotic medications for insomnia do not have better sleep than chronic insomniacs not taking medications. In fact, chronic users of hypnotic medications have more regular nighttime awakenings than insomniacs not taking hypnotic medications.
Rates of use were lowest among the youngest age group (those aged 20–39) at about 2%, increased to 6% among those aged 50–59, and reached 7% among those aged 80 and over. More adult women (5%) reported using prescription sleep aids than adult men (3%). Non-Hispanic white adults reported higher use of sleep aids (5%) than non-Hispanic black (3%) and Mexican-American (2%) adults. No difference was shown between non-Hispanic black adults and Mexican-American adults in use of prescription sleep aids. Antihistamines
As an alternative to taking prescription drugs, some evidence shows that an average person seeking short-term help may find relief by taking over-the-counter antihistamines such as diphenhydramine or doxylamine. Diphenhydramine and doxylamine are widely used in nonprescription sleep aids. They are the most effective over-the-counter sedatives currently available, at least in much of Europe, Canada, Australia, and the United States, and are more sedating than some prescription hypnotics. Antihistamine effectiveness for sleep may decrease over time, and anticholinergic side-effects (such as dry mouth) may also be a drawback with these particular drugs. While addiction does not seem to be an issue with this class of drugs, they can induce dependence and rebound effects upon abrupt cessation of use. However, people whose insomnia is caused by restless legs syndrome may have worsened symptoms with antihistamines. Antidepressants
While insomnia is a common symptom of depression, antidepressants are effective for treating sleep problems whether or not they are associated with depression.