Birds don’t have to work at not falling off their perches when they sleep.
Tendons on the bottom of their feet, called flexor tendons, respond to pressure from a branch or other perch by causing the toes to wrap around the perch automatically.
Humans would have to expend energy to hold on, but birds would have to exert effort to unclench.
It’s the relaxed position, as can be plainly seen in dead birds, which have their toes clenched up.