Birds sleep wherever they can find shelter, from both predators and cold temperatures. They roost in the same spots where they seek protection during the day, such as tree branches and bushes, or they may cling to man-made structures like chimneys or building walls. Some birds, such as pigeons and waterfowl, rest in water while others like woodpeckers or hummingbirds find safe spots in trees or other types of natural habitats.
Most diurnal birds, including songbirds and hummingbirds, enter a deep state of sleep called torpor at night. Then, at dawn, they awaken, startling anyone in their path.
To get a good night’s rest, these birds fluff their feathers to keep warm, and they cover their bare feet in down or other insulating material. They may tuck their wings in close to their bodies, too. Birds can even sleep with one eye open, thanks to a special state of consciousness known as unihemispheric slow-wave sleep (USWS). This allows half of the brain to remain awake and aware of its surroundings, so they can fly off quickly if a threat appears.
It’s also quite unlikely that a sleeping bird will fall off its perch. That’s because the tendons in their legs automatically tighten around the branch on which they are roosting. This gives the birds a vice-like grip and ensures they won’t fall off the tree or ledge.