The rule is simple: the roost must sit higher than the top of your highest nesting box — ideally 6 to 12 inches above it. Chickens instinctively sleep at the highest point they can reach, so if the boxes are as high as or higher than the roost, the birds sleep in the boxes, poop in them all night, and start laying wherever they happen to be. Get the height order right and floor eggs and filthy boxes both largely disappear.
This is the single most common fix I hand keepers who are fighting dirty eggs and floor-laying, and nine times out of ten they’ve never heard it. They’re adjusting the boxes, adding curtains, rearranging bedding — when the real problem is that their roost and their boxes are at the same height and the hens are voting with their feet every night. Here’s exactly how roost height and nest box height interact, and how to set them so the birds sleep where you want and lay where you want, drawn from my full roost design system.

Should the Roost Be Higher Than the Nesting Boxes?
Yes, always. The roost must be higher than the top of the highest nesting box, without exception. This is the one non-negotiable rule of coop internal layout, because it works directly with a chicken’s instinct to sleep at the highest available point. When the roost is the highest thing in the coop, the birds choose it every night on their own.
Everything else in roost design is a preference or a trade-off; this is a rule. A hen at dusk scans the coop for the highest safe perch and heads for it. If that’s your roost, great — she sleeps there, and the overnight droppings land on the poop board below. If the highest point is a nest box, she’ll roost in the box, and now that box collects a night’s worth of droppings, gets fouled, and the eggs laid in it come out stained. The behavior is described consistently in poultry housing guidance from sources like the Cooperative Extension poultry program, and it matches exactly what I see in my own coop every single night. Set the roost above the boxes and you’re working with the instinct instead of against it.
How Much Higher Should the Roost Be?
Put the roost 6 to 12 inches above the top of the highest nesting box. A clear margin matters — a roost only an inch or two higher doesn’t read as decisively “the highest spot” to a hen, and some birds will still choose the box. A solid foot of separation removes any ambiguity and settles the question for the whole flock.
In my coop the nest boxes sit with their tops around 18 inches off the floor and the main roost runs at 30 inches — a full foot of clearance. That gap is deliberate. When I first built it I had the roost only about 4 inches above the boxes, and a couple of my more stubborn hens kept choosing the boxes anyway; raising the roost that extra clearance ended the argument within a few nights. Don’t overdo the height in the other direction, though — the roost still has to respect the safe-landing and headroom limits from the height and spacing numbers, so for heavy breeds you’re balancing “clearly above the boxes” against “not so high it hurts their feet on landing.” Lower the boxes if you have to, rather than pushing the roost dangerously high.
Why Do Chickens Sleep in the Nesting Boxes?
Chickens sleep in nesting boxes for one main reason: the boxes are the highest or most enclosed sleeping-feeling spot they can reach. A box that sits level with or above the roost wins the instinct to perch high, and its enclosed sides feel safe. Young pullets learning the coop are especially prone to it before they’ve figured out the roost.
Sometimes it’s not height at all — a low-ranking bird bullied off a too-short roost retreats to a box because it’s the only spot left, which points back to insufficient roost length rather than height. And pullets just starting out often pile into boxes at night simply because they haven’t learned to roost yet; you fix that by lifting them onto the roost after dark for several nights until the habit forms. But by far the most common cause is the height order being wrong. Before you blame the birds, measure: is the top of any box higher than the roost? If so, that’s your answer, and no amount of scolding a hen will beat her instinct to climb.

How Does Roost Height Cause Floor Eggs?
When hens sleep in the nesting boxes, they foul them and disrupt the boxes as clean laying spots, so hens looking for a private place to lay give up on the boxes and lay on the floor instead. A box full of overnight droppings doesn’t read as an attractive nest, so the floor becomes the default. Correcting the roost height restores the boxes as the obvious place to lay.
The chain is indirect but reliable: wrong height order leads to box-sleeping, box-sleeping leads to fouled boxes, fouled boxes lead to hens rejecting them, and rejected boxes lead to floor eggs and dirty eggs. Extension guidance on reducing floor eggs — including from Penn State Extension — points to clean, attractive, appropriately placed nest boxes as the fix, and you can’t keep a box clean if the flock is sleeping in it. So the roost height problem masquerades as a nest box problem. Keepers spend weeks on box curtains and golf-ball decoys when the actual lever is 12 inches of roost clearance. Fix the height order first, then optimize the boxes.
How Do I Stop Hens Sleeping and Laying in the Wrong Place?
Raise the roost to a clear 6 to 12 inches above the boxes, clean the boxes thoroughly, and if birds are stubborn, block the box openings at night for a week so the roost becomes the only option. After the flock relearns to sleep on the roost, the boxes stay clean and hens return to laying in them.
My sequence when I fixed mine: I raised the main bar, scrubbed every box back to clean bedding, and for the most stubborn hen I clipped a temporary cover over her favorite box entrance each evening after she’d laid, removing it in the morning. Three nights of that and she was roosting on the bar with everyone else. It helps to make the boxes less appealing as bedrooms and more appealing as nests — keep them slightly lower, a bit dim, and fitted with box curtains that signal “private nest” rather than “open perch.” Roll-away boxes help on the egg-cleanliness side too, because any egg that is laid rolls out of the fouling zone immediately. But none of it works until the roost is decisively the higher perch.
What Height Should the Nesting Boxes Be?
Mount nesting boxes 18 to 20 inches off the coop floor — high enough to feel secure and keep bedding clean, but comfortably below the roost. The exact number matters less than the relationship: whatever height you choose, the roost has to sit clearly above the top of the boxes. Boxes too high compete with the roost; boxes on the floor invite dampness and predators.
I keep my box tops around 18 inches, which leaves a full foot of clearance under the 30-inch roost. If your coop is short and you can’t get that separation, lower the boxes rather than raising the roost past a safe landing height for your heaviest birds. The full details of box sizing, count, and placement are in my nesting box guide and the DIY box build — but the one number that ties the whole coop interior together is this height relationship. Plan the roost and the boxes as a pair, never in isolation.
What If My Coop Is Too Short for the Height Gap?
In a small or short coop, get the height gap by lowering the boxes rather than raising the roost, and use external nest boxes that hang off the coop wall to free up interior height. If you truly can’t create a clear gap, a slanted “anti-roost” cover over the tops of the boxes stops birds perching on them, which achieves the same end.
Compact prefab coops are where this problem bites hardest, because the roost and boxes are crammed into a low box with no room to separate them vertically. Two fixes work. First, mount the nest boxes as external units that bump out from the coop wall with their own little roof, so their tops sit lower inside and the roost has clear air above it — this also reclaims floor space. Second, if the box tops are unavoidably near roost height, build a simple sloped cover over them, angled steeply enough that a bird can’t perch on top; she slides off and heads for the roost instead. I’ve used a scrap of plywood at roughly 45 degrees to do exactly this on a friend’s tight coop, and it stopped the box-perching overnight. The goal is always the same: make the roost the only comfortable high perch in the coop.
The Mistake That Filled My Boxes With Droppings
My first coop had the nest boxes and roost at almost the same height, and every morning I was scraping droppings out of the boxes and washing stained eggs. I blamed the hens, added curtains, tried decoy eggs — nothing worked. The boxes stayed filthy and I was getting floor eggs in the corners.
The fix took ten minutes once I finally understood it: I dropped the boxes a few inches and raised the roost a foot, opening up a clear gap between them. Within three nights the box-sleeping stopped, the boxes stayed clean, and the floor eggs tapered off as the hens returned to laying in proper, tidy nests. I’d wasted weeks treating symptoms. The whole saga is why I now tell every keeper the same thing before they touch anything else: measure your roost against your boxes. If the roost isn’t clearly higher, that’s the problem, and it’s the cheapest one in the coop to fix.
Should the roost be higher than the nesting boxes?
Yes, always. The roost must sit higher than the top of the highest nesting box, ideally by 6 to 12 inches. Chickens sleep at the highest point they can reach, so if the boxes are as high as the roost, the birds will sleep and poop in the boxes instead.
How much higher than the nesting box should the roost be?
Put the roost 6 to 12 inches above the top of the highest nesting box. A clear margin of about a foot removes any ambiguity so the whole flock chooses the roost. A roost only an inch or two higher may not read as the highest spot to every bird.
Why do my chickens sleep in the nesting boxes?
Usually because the boxes are as high as or higher than the roost, so they win the instinct to perch high, or because a low-ranked bird was bullied off a too-short roost. Young pullets also do it before they learn to roost. Raise the roost above the boxes to fix it.
How do I stop chickens laying eggs on the floor?
Make the nest boxes the obvious clean place to lay by raising the roost above them so the birds stop sleeping and pooping in the boxes. Clean the boxes, keep them slightly dim and private, and block box entrances at night for a week if birds are stubborn about roosting in them.