The circadian rhythm of pineal melatonin secretion, which is controlled by the suprachiasmatic nucleus (SCN), is reflective of mechanisms that are involved in the control of the sleep/wake cycle. Melatonin can influence sleep-promoting and sleep/wake rhythm-regulating actions through the specific activation of MT(1) (melatonin 1a) and MT(2) (melatonin 1b) receptors, the two major melatonin receptor subtypes found in mammals. Both receptors are highly concentrated in the SCN. In diurnal animals, exogenous melatonin induces sleep over a wide range of doses. In healthy humans, melatonin also induces sleep, although its maximum hypnotic effectiveness, as shown by studies of the timing of dose administration, is influenced by the circadian phase. In both young and elderly individuals with primary insomnia, nocturnal plasma melatonin levels tend to be lower than those in healthy controls. There are data indicating that, in affected individuals, melatonin therapy may be beneficial for ameliorating insomnia symptoms. Melatonin has been successfully used to treat insomnia in children with attention-deficit hyperactivity disorder or autism, as well as in other neurodevelopmental disorders in which sleep disturbance is commonly reported. In circadian rhythm sleep disorders, such as delayed sleep-phase syndrome, melatonin can significantly advance the phase of the sleep/wake rhythm. Similarly, among shift workers or individuals experiencing jet lag, melatonin is beneficial for promoting adjustment to work schedules and improving sleep quality. The hypnotic and rhythm-regulating properties of melatonin and its agonists (ramelteon, agomelatine) make them an important addition to the armamentarium of drugs for treating primary and secondary insomnia and circadian rhythm sleep disorders.