Normal circadian rhythms are synchronized to a regular 24 h environmental light-dark cycle, and the suprachiasmatic nucleus and the hormone melatonin have important roles in this process. Desynchronization of circadian rhythms, as occurs in chronobiological disorders, can produce severe disturbances in sleep patterns. According to the International Classification of Sleep Disorders, circadian rhythm sleep disorders (CRSDs) include delayed sleep phase syndrome, advanced sleep phase syndrome, non-24 h sleep-wake disorder, jet lag and shift-work sleep disorder. Disturbances in the circadian phase position of plasma melatonin levels have been documented in all of these disorders. There is compelling evidence to implicate endogenous melatonin as an important mediator in CRSD pathophysiology, although further research involving large numbers of patients will be required to clarify whether the disruption of melatonin secretion is a causal factor in CRSDs. In this Review, we focus on the use of exogenous melatonin and light therapy to treat the disturbed sleep-wake rhythms seen in CRSDs.