Birds surround their legs and grab a branch of a tree. The question is, how do they balance themselves on this branch even when they are asleep? If you fall asleep holding something, at some point your limbs calm down and let go of what was in your hand. How is it that birds do not rest their feet when sleeping and cling to a branch?
The answer is that birds use their claws to grab branches, and the reason they do not fall asleep is because it is an involuntary action. When they cling to a branch, and they bend their legs to sit on it, their claws automatically overpower it and LOCK it. They open the locks only when their legs are straight. As long as this bird is sitting, it will remain locked from the branch. In other words, the bird cannot leave the branch even if it wants to, as long as its legs (ankles) are bent.
Birds have mostly hard claws and bones in their feet and toes, which have heavy skin. There is a limited supply of nerves, blood vessels and muscles and this is what enables them to land on the cold metal part. There is a tight band of connective tissue that usually connects the muscles to the bone and fights it. The claws are made of a type of protein called collagen.
The legs, claws, fingers, and muscles of the bird are so physically located that it is almost automatic (or unavoidable). When the bird lands on a branch, its ankle is twisted. There is no muscle in it. Effort not included. Rather, it is automatic - the system is only physically locked in place. This prevents birds from falling off a branch during unnecessary reflex sleep. The tendons are tight until the legs are straight. When the bird stands up, its legs straighten, its claws open, and its toes open with their toes. Falling asleep does not change the grip, as the bird's weight keeps the leg in a closed position.
Do all birds lock their feet?
Studies of birds have shown that they possess a large number of physical features (such as front and back fingers, flexible claws) to avoid the aforementioned digital claw locking mechanism. More than half of these species belong to the same order, including crows, bulbuls, and birds, as well as many reptiles (birds of prey such as falcons, owls, etc.), pigeons, and waterfowl. We also know that they use this method for a variety of activities such as swimming, climbing, hunting, wrapping, hanging and tree climbing.
We also need to consider how birds sleep. Unlike humans, birds (and most other animals) do not sleep for several hours at a time. In many of these birds, their whole brains do not fall asleep - part of their brain stays awake - which is why some of them can fall asleep while flying and some for sleeping prey. Stay alert. Therefore, even if they are 'sleeping', they need to use the method of locking unnecessarily so as not to be out of their comfort zone.
I think we can say that it is possible that a lot of birds stand on trees and sleep without falling due to the digital claw locking mechanism, but we do not believe that it is all balanced and trees But sleep.