What prevents chicken from falling the roost while asleep?
Chickens have a special adaptation called the "hallux" or "rear toe" which is an opposable toe.
When a chicken perches on a branch or roost, it will automatically curl this special toe around the branch, gripping it firmly. This toe is the last to grip before sleep and the first to let go when the chicken decides to jump or fly from its roost.