Birds that typically perch in trees have the skill to sleep on branches without falling off.
What is the reason behind this? It turns out that the toes of tree-dwelling birds are specifically adapted for gripping branches. If you closely observe the posture of birds perching on branches, you will see that once they land on a branch, they bend their tibiotarsus and tarsometatarsus bones and squat on the branch. At this point, the pressure from their body weight is concentrated on the tarsometatarsus bone, which tightens the ligament behind it, simultaneously pulling tight the flexor tendons on their toes, causing the toes to curl and tightly grip the branch. Thus, when birds perch on branches, even while sleeping, their toes remain tightly clenched around the branch due to the pressure from their body weight. If they stand up straight, the tips of their toes will extend.
Additionally, birds have more developed brains compared to reptiles. Although their cerebral hemispheres lack wrinkles, they are relatively larger. The cerebellar vermis is the most developed, and the optic lobes are also large, which not only suits their flying lifestyle but also enhances their ability to regulate movement and vision, allowing them to maintain good body balance. Therefore, birds can perch on branches and remain stable without falling, which is another important reason.