How do birds get to sleep?

They find a safe spot to perch, wrap their little claws tightly around it, and close their eyes. Birds are light sleepers.