Mine sleep in the nests occassionally for the following reasons:
- they're thinking about going broody, or have gone broody
- they got chased off the roost by alpha hen after dark and couldn't find their way back in the dark so they hop in the closest space which is a nest
- for some other reason they weren't getting along with the other chickens and guineas on the roost (often my newbies will sleep in the nest area since it's "unclaimed")
- if they feel sick and want to be by themselves (if this is the case I put them in a separate hospital pen).
- they just like it better
-once one had a hurt leg and couldn't fly up to the roost
I don't like to clean poopy nests either, so here's my solution: after dark, when I shut the henhouse door, if any are roosting in the nest, I physically move them to the roost. It takes 2-3 days of this "training" and they stop sleeping in the nest. Chickens are creatures of habit, and if you let them sleep in the nest, they'll do it continuously.
Some old-time nest boxes have a hinged bar across the front --during the day it's for the hens to stand on before hopping into the nest, but in the afternoon after collecting eggs, it can be moved upward to block access to the nest. If you shut the door after dark, you move the bar down again so they can lay eggs in the early morning.