Insufficient daytime sleep may result in reduction of effectiveness and safety during overnight military missions. The usefulness of temazepam and zaleplon to optimize afternoon sleep and their effects on performance and alertness during a subsequent night shift were studied. Method: In a randomized double-blind within-subjects design, 11 subjects took 20 mg of temazepam, 10 mg of zaleplon, or placebo before a 5:30-10:00 p.m. sleep period. Sleep length and quality were measured. Subjects were kept awake throughout the night while alertness, cognitive performance, and muscle power were repeatedly measured. Results: Temazepam provided significantly longer and qualitatively better sleep than zaleplon or placebo. During the night, sleepiness increased and muscle power was impaired in all conditions. Better sleep was correlated with less sleepiness during the night. Conclusion: Temazepam is useful to optimize a 4.5-hour afternoon sleep before overnight missions. Irrespective of hypnotic treatment, sleepiness and fatigue increased during the night shift.