Some birds sleep while soaring through the skies, a new study has found.

Like most animals, birds also need to get their daily amount of sleep. Certain birds like swifts, songbirds, sandpipers and seabirds do not get the adequate amount of sleep since they are airborne day and night. So, scientists assumed they are capable of sleeping while still in flight.

To verify their assumption, researchers fitted 14 red-breasted frigatebirds with miniature brain activity monitors and found that they are capable of sleeping mid-flight. The study, published Wednesday in the journal Nature Communication, found that the birds sleep for an average of 41 minutes per day, even while they are in flight. They take quick 12-second naps, usually using only half their brain but sometimes all of it.

Birds exhibit two forms of sleep: slow-wave sleep and rapid eye movement sleep (REM sleep), just like mammals. Slow-wave sleep can alternate between both hemispheres of the brain but REM sleep occurs simultaneously in both. In slow-wave sleep, the eye that is connected to the active hemisphere remains open. This allows the bird to sleep but still remain aware of its environment. If it isn’t necessary for the bird to watch its environment, slow-wave sleep that involves both hemispheres takes control. REM sleep, which causes reduction in muscle tone, isn’t likely when the bird is in flight, the study found.

Co-author of the study Niels Rattenborg from the Max Planck Institute for Ornithology in Germany reportedly said, “Some people thought that all their sleep would have to be unihemispheric otherwise they would drop from the sky. But that's not the case — they can sleep with both hemispheres and they just continue soaring.”

He added that the birds usually take their naps when they don’t have to flap their wings too much like when they are circling in rising air currents. He also said that understanding how birds manage with so little sleep can help study the consequences of sleep deprivation in humans and other animals.