Night float rotations are used in residency training programs to reduce residents' sleep deprivation. Night shift work, however, is accompanied by deleterious effects on sleep, mood, and attention. To test whether melatonin reduces the deleterious effects of night shift work on sleep, mood, and attention in pediatric residents during night float rotation. Double-blind, randomized, placebo-controlled crossover. Participants took melatonin (3 mg) or a placebo before bedtime in the morning after night shift; completed a sleep diary and an adverse-effects questionnaire daily; and completed the Profile of Mood States and the Conners Continuous Performance Test 3 times in each study week to test mood and attention, respectively. A university-affiliated, tertiary-care pediatric hospital. Healthy second-year pediatric residents working 2 night float rotations. Standardized measures of sleep, mood, and attention. Twenty-eight residents completed both treatments; 17 completed 1 treatment (10 placebo, 7 melatonin). There was not a statistically significant difference in measures of sleep, mood, and 5 of 6 measures of attention during melatonin and placebo treatment. One measure of attention, the number of omission errors, was significantly lower on melatonin (3.0 +/- 9.6) than on placebo (4.5 +/- 17.5) (z = -2.12, P = .03). The isolated finding of improvement of 1 single measure of attention in a test situation during melatonin treatment was not sufficiently robust to demonstrate a beneficial effect of melatonin in the dose used. Other strategies need to be considered to help residents in adaptation to night shift work.