Many birds fly non-stop for days or longer, but do they sleep in flight and if so, how? It is commonly assumed that flying birds maintain environmental awareness and aerodynamic control by sleeping with only one eye closed and one cerebral hemisphere at a time. However, sleep has never been demonstrated in flying birds. Here, using electroencephalogram recordings of great frigatebirds (Fregata minor) flying over the ocean for up to 10 days, we show that they can sleep with either one hemisphere at a time or both hemispheres simultaneously. Also unexpectedly, frigatebirds sleep for only 0.69 h d(-1) (7.4% of the time spent sleeping on land), indicating that ecological demands for attention usually exceed the attention afforded by sleeping unihemispherically. In addition to establishing that birds can sleep in flight, our results challenge the view that they sustain prolonged flights by obtaining normal amounts of sleep on the wing.