Yes, birds do sleep. Like all warm-blooded animals, they sleep when they are tired and full of food. After all, most birds cannot see well at night. Only a few, like the owls, have large eyes specially adapted for night vision. When they sleep their toes automatically lock tight, thus preventing them from falling while asleep.
The above image of the Common Iora (Aegithina tiphia) snug in its nest, was taken by Cheong Weng Chun at night. Although it shows the back view, I am sure the bird was fast asleep.
Many species like mynas, crows, starlings, Pacific Swallow (Hirundo tahitica) and Barn Swallow (Hirundo rustica) (above) come together in the evening before dusk to roost on the branches of certain trees. During this period they generate much noise as they squabble over their favourite perch before settling down for the night. Although asleep, these birds are alert and will suddenly move off amidst much noise if disturbed. Early next morning, just before dawn, they wake up, yawn, stretch, refreshed but hungry. Then off they fly to forage.
Hole nesters like woodpeckers usually sleep in tree cavities. Ground nesters sleep on or near the ground.
Obviously nocturnal birds like owls and nightjars sleep during the day.
And many birds “talk” in their sleep and some even sing on moonlit nights.
Input by YC, image above by Cheong Weng Chun, below by YC.