Why birds don't fall while sleeping on a branch?

Birds have a fascinating adaptation that allows them to sleep securely on branches without falling off. This is due to a special perching reflex or tendon locking mechanis in their legs known as the flexor tendon. When a bird lands on a branch and bends its legs, this tendon automatically tightens, causing the toes to curl around the branch and grip it firmly. This action does not need any active muscle contraction and works just like a lock. Once the toes are locked in place, they stay that way as long as the leg remains bent. This is an involuntary process, which means that the bird does not need to consciously control it. The body weight of the bird naturally keeps the legs bent, which keeps the locking mechanism engaged. Therefore, even when the bird is in deep sleep, the grip remains strong and the bird does not fall. The toes will unlock only when the bird straightens its legs consciously, which usually happens when it wakes up or prepares to fly. This adaptation is especially...