Why birds can sleep on branches and not fall off...
Geege Schuman stashed this in Birds
Stashed in: Birds!
Massive talons with holding technology.
The avian talon works through a "pulley system of tendons," according to the animal morphology blog Ars Anatomica, and it can lock into place.
"The bird's foot closes and grasps automatically as the ankle and knee joints are bent," we read. "This grasp cannot be released until the limb is straightened again."
So, instead of expending precious energy holding the muscles tight—as you would if you were hanging onto a branch with your fists/arms—the system simply physically locks in place.
A 1990 paper in Zoomorphology goes into more depth about the biomechanics of the lock, which results from the placement of the tendons and evolved specializations of their texture.
It appears that this mechanism — as described in the paper and post above — is an area of active scientific dispute (!). A 2010 paper in the Journal of Experimental Zoology Part A found that such a mechanism did not exist in the European starling.