OBJECTIVES To determine whether sleep inertia (grogginess upon awakening from sleep) with or without zolpidem impairs walking stability and cognition during awakenings from sleep. DESIGN Three within-subject conditions hypnotic medication (zolpidem), placebo (sleep inertia), and wakefulness control randomized using balanced Latin square design. SETTING Sleep laboratory. PARTICIPANTS Twelve older and 13 younger healthy adults. INTERVENTION Five milligrams of zolpidem or placebo 10 minutes before scheduled sleep (double-blind: zolpidem or sleep inertia); placebo before sitting in bed awake for 2 hours after their habitual bedtime (single-blind: wakefulness control). MEASUREMENTS Tandem walk on a beam and cognition, measured using computerized performance tasks, approximately 120 minutes after treatment. RESULTS No participants stepped off the beam on 10 practice trials. Seven of 12 older adults stepped off the beam after taking zolpidem, compared with none after sleep inertia and three after wakefulness control. Fewer young adults stepped off the beam: three after taking zolpidem, one after sleep inertia, and none after wakefulness control. Number needed to harm analyses showed one tandem walk failure for every 1.7 (95% confidence interval (CI)=1.4-2.0) older and 5.5 (95% CI=5.2-5.8) younger adults treated with zolpidem. Cognition was significantly more impaired after zolpidem exposure than with wakefulness control in older and younger participants (working memory: older, -4.3 calculations, 95% CI=-7.0 to -1.7; younger, -12.4 calculations, 95% CI=-18.2 to -6.7; Stroop: older, 76-ms increase (95% CI=13.5-138.4 ms); younger, 126-ms increase, 95% CI=34.7-217.5 ms), whereas sleep inertia significantly impaired cognition in younger but not older participants. CONCLUSION Zolpidem produced clinically significant balance and cognitive impairments upon awakening from sleep. Because impaired tandem walk predicts falls and hip fractures and because impaired cognition has important safety implications, use of nonbenzodiazepine hypnotic medications may have greater consequences for health and safety than previously recognized.