The actions of melatonin on the sleep-wake cycle were investigated by means of a randomised, double-blind, placebo-controlled trial in 8 subjects with a delayed sleep phase syndrome attending a sleep disorders clinic. In randomised order the subjects received placebo or melatonin 5 mg daily for 4 weeks with a 1 week washout period between the treatments. Drug or placebo was given at 2200 h, 5 h before the mean time of sleep onset determined by pretrial sleep logs. In all 8 subjects sleep onset time (mean advance 82 [range 19-124] min; p less than 0.01) and wake time (117 [10-187] min; p less than 0.01) were significantly earlier during melatonin treatment than during placebo. Mean total sleep time was slightly less on melatonin (8 h 12 min) than on placebo (8 h 46 min). Alertness acrophase calculated from the subjects' ratings of alertness made every 2 h while awake was unaltered. Melatonin may act as a phase-setter for sleep-wake cycles in subjects with a delayed sleep phase syndrome.