When I talk to people about birds, one misunderstanding comes up again and again, one thing that everyone seems to get wrong. Not dumb people, either. Dumb people get a lot of things wrong. These people think of themselves as smart people, and by and large, they are. They’re just not bird people.

What is this avian misconception? I hope you’re sitting down because here it is: Birds don’t sleep in their nests.

They don’t. The mental image is a cute one—a little bird, tuckered out after an early morning of worm-getting, peeling back a tiny leaf blanket in its cozy little nest—but it’s just not the case. Nests (for birds that even make nests—many of them don’t) are for keeping eggs and chicks in place. When nesting season is over, nests are a mess—splattered in the droppings of the fledglings and, in some cases, a dead chick. These messes can attract parasites and predators, and birds just don’t need the nests anymore.

So where do birds sleep? Lots of places. When birds settle down to sleep, it’s called “roosting,” and the main things they’re looking for are safety and warmth. Songbirds have to keep off the ground to avoid cats and things, and out of the open to avoid owls. Dense brush or foliage does fine. Bigger birds have more options and can sleep on the water, on a branch, or even just right on the ground.

Few roosts are completely safe, though, so some birds have developed the ability to literally sleep with one eye open. The eyes of most birds (unlike in humans) send information to only one side of the brain. Unihemispheric slow-wave sleep allows birds to slide one hemisphere of their brain into a deep sleep while leaving the other hemisphere awake and alert. Birds can turn USWS on and off depending on how safe their roost is: For example, when a large flock of ducks is roosting on an open lake, the birds in the safety of the center of the flock may shut down completely, while the more vulnerable birds at the edge of the flock may enter USWS to stay alert. What’s more, scientists suspect that some birds use USWS to sleep while in flight.

OK, so birds don’t sleep in their nests. Let’s get more specific than that. There are a lot of different kinds of birds, and they roost in different ways. So you’ll be able to really dazzle ‘em at your next cocktail party, here’s how a bunch of different families of birds really do prefer to roost.

Geese and ducks. A coyote would love nothing more than to run up on a big, fat, delicious, sleeping goose. Their bigness and fatness, along with their webbed feet, make it impossible for waterfowl to sleep in the safety of a tree. Most of the time, geese and ducks sleep at night right on the water. Eagles and hawks aren’t a threat because they also sleep during the night, and any predator swimming after the birds would send vibrations through the water, waking them up. Small islands work, too. Waterfowl also sleep on the shore, usually standing on one leg (tucking the other one up into the warmth of its feathers).

Herons and egrets. These big wading birds really have only equally large predators to worry about: alligators and eagles. Sometimes herons and egrets roost in the shallows, relying on vibrations in the water to warn them of reptiles, but they’re most often seen roosting in large flocks in waterside trees.

Shorebirds. Spending most of their time out on open beaches, birds like sandpipers and plovers are vulnerable to dive-bombing raptors even when they’re awake. Not being equipped to sit in trees or float on the water, sleeping is an even more dangerous proposition. Shorebirds simply do the best they can, roosting on open beaches in large flocks (to help raise alarm) and almost certainly using USWS to keep alert.

Hawks, eagles, and owls. You know that old joke about where the 800-pound gorilla can sit? Well hawks and eagles follow the same rule: anywhere they want to. Big raptors don’t have to worry about predators so long as they’re off the ground, so they’ll usually just find a tree branch somewhere. Owls also sleep in trees, usually during the day, either in dense foliage (to keep the light out) or, for certain species, in tree cavities.

Grouse and quail. Sleep is perhaps most dangerous for these guys—all fat and juicy and, typically, with a poor ability to fly. Everything eats them. They sleep in the safest places they can find and use USWS and camouflage in their defense. Birds that live where there are trees, like spruce or ruffed grouse, will fly up and sleep on tree branches. Where there aren’t trees but only smaller vegetation, birds like willow ptarmigan will sleep in the vegetation. Where there’s nothing at all, no trees or bushes, say, and the land is covered in snow, birds like white-tailed ptarmigan will trust in their all-white plumage and nestle down right there in a snowy hillside.

Woodpeckers. Most woodpeckers roost in tree cavities, either ones they’ve used as nest holes or sometimes ones they’ve chiseled out just for sleeping. Lots of birds roost in tree cavities, or really any hole or covered area, for that matter. Humans have helped, creating lots of protected nooks under roofs, bridges, barns, and ledges.

Crows, swallows, swifts, starlings. These birds aren’t closely related, but they share some incredible communal roosting behaviors. Some species, for social or safety reasons or for warmth, choose to sleep together—sometimes in gigantic flocks. The spectacle of these flocks gathering at dusk is amazing to some people, eerie to others, but impossible to look away from. Check out these videos of hundreds of crows in Maryland, thousands and thousands of tree swallows in Florida, these chimney swifts wheeling into a middle school in Wisconsin, and this famous viral video of a starling “murmuration” in the United Kingdom.

Pretty much everything else. The bulk of the remaining birds—more than half of all bird species—are perching birds from the order Passeriformes. Classic bird-birds: sparrows, warblers, cardinals, jays, buntings, etc. For the most part, all these perching birds use dense vegetation—bushes, hedges, trees—to sleep. They just fly in at dusk, grab hold of an appropriately-sized twig, and conk out.

How do perching birds stay perched on their perch while they’re asleep, you might ask? Evolution, of course. Passerines have developed “flexor tendons” in their legs that involuntarily clasp shut when a bird squats on a perch. The tendons won’t relax until a bird straightens its leg, so a bird physically can’t leave until it’s ready. The grip is so tight that some birds, like this hummingbird, have been seen sleeping upside down. Looks plenty comfortable to me, and no nest required.