Melatonin, produced by the pineal gland at night, has a role in regulation of the sleep-wake cycle. Among elderly people, even those who are healthy, the frequency of sleep disorders is high and there is an association with impairment of melatonin production. We investigated the effect of a controlled-release formulation of melatonin on sleep quality in 12 elderly subjects (aged 76 [SD 8] years) who were receiving various medications for chronic illnesses and who complained of insomnia. In all 12 subjects the peak excretion of the main melatonin metabolite 6-sulphatoxymelatonin during the night was lower than normal and/or delayed in comparison with non-insomniac elderly people. In a randomised, double-blind, crossover study the subjects were treated for 3 weeks with 2 mg per night of controlled-release melatonin and for 3 weeks with placebo, with a week's washout period. Sleep quality was objectively monitored by wrist actigraphy. Sleep efficiency was significantly greater after melatonin than after placebo (83 [SE 4] vs 75 %, p < 0.001) and wake time after sleep onset was significantly shorter (49  vs 73  min, p < 0.001). Sleep latency decreased, but not significantly (19  vs 33  min, p = 0.088). Total sleep time was not affected. The only adverse effects reported were two cases of pruritus, one during melatonin and one during placebo treatment; both resolved spontaneously. Melatonin deficiency may have an important role in the high frequency of insomnia among elderly people. Controlled-release melatonin replacement therapy effectively improves sleep quality in this population.