FYI: Birds do not sleep in nests.
Nests are safe places for birds to leave their eggs; they are not self-made sleeping quarters.
That being said, birds have been known to nod off, while sitting atop their eggs. But the only reason they have chosen the nest for rest is to keep the eggs warm.
When a bird seeks out a roosting location they are looking for two things: warmth and safety. Songbirds sleep off the ground to avoid predators but larger birds can sleep anywhere, from on the water, to branches, to on the ground.
Birds that sleep in bushes, on branches or on power lines, have flexor tendons in their legs that maintain a fixed grip on their chosen perch. These tendons only release the grip, established by the bird’s feet, when the leg is outstretched. This trait allows some birds the ability to sleep upside down.
Birds often flock together for safety while they sleep. The birds in the center of the formation are able to completely nod off, while the ones on the outer ring adopt a unihemispheric slow-wave sleep. During this kind of sleep, the birds keep one eye open to watch for predators. Half of their brain is allowed to rest while the other half is on moderate alert. Throughout the night, the birds on watch switch positions with the inner circle, giving the entire flock a chance for consistent rest.
A great local example of this sleep formation is the flock of crows that roost along Boundry Road, on the border of Vancouver and Burnaby. You can see these crows moving into position an hour before dusk every night. It is one of the coolest natural phenomenons in Vancouver.
Fun Fact: A flock of crows is not a murder. Poets, not the scientific community, adopted the term ‘murder of crows’. Birders and scientists use the common term ‘flock’ to describe a group of crows.