The birds weren't actually napping. I was lucky enough to get photographs of their third eyelids—what biologists refer to as the nictating membrane. The term is drawn from the Latin word nictare ("to blink"). Birds have paired eyelids, as we do. These close vertically (from the top and bottom) when the bird sleeps. The nictating membrane is a separate structure located between the eyelids and the cornea. It usually remains hidden at the inner corner of the eye. The nictating membrane has two primary purposes: to clean and moisten the surface of the eye, and to protect it from injury.
This structure shows a lot of adaptive variation. Raptors have a nearly transparent nictating membrane, allowing them to see while flying but also protecting the eye from injury caused by twigs, branches, or struggling prey. Imagine the benefits of such protection for fast-flying or pelagic (sea-faring) birds, which otherwise face the drying effects of wind and abrasion from small airborne particles. Woodpeckers and nuthatches have unusually thickened, opaque nictating membranes that protect their eyes from flying wood chips.
Nictating membranes are common in every vertebrate group except mammals, suggesting that the structure evolved in fishes and was lost much later by some mammals. Monotremes (the platypus and echidna, most "primitive" among the living mammals) have nictating membranes, as do marsupials. A few groups of placental mammals retain them, in particular those that are aquatic—seals and sea lions, manatees and dugongs, and beavers. For polar bears, nictating membranes serve the additional role of protecting against UV light that is so strong in the polar environment.
A tiny member of the loris family, found in West Africa, is the only primate with fully functional nictating membranes: able to clean the eye and move freely across it. But this structure has not been completely lost in other primates. Take a look in the mirror. See the pink, crescent-shaped blob at the inner corner of your eye? That is a nictating membrane—or what's left of it. Opthalmologists call this the plica semilunaris. It's often said to be vestigial, a scientific term for structures that have been retained through evolutionary time but lost their function. That's not an entirely accurate description in this case. Although the plica semilunaris has no ligamenture that permits movement, it still helps to clean the eye by producing fatty secretions to which pollen, dust, and other particles stick. These waste materials glom up and weep out. Nictare—blink, blink—and your eyes are cleaner. No goggles required.