Hello there....Generally, it's good to discourage your hens from sleeping in the nesting box, because then they will poop in it, then you will have dirty eggs. So what you can do, if you have hens that like to sleep there, is cover the nesting boxes with something at night, and that will force them to sleep elsewhere. They might fuss about it, but after a week they'll be used to sleeping hopefully on a roost in your coop. My roosts are a 2X4 board, with the broad side up so they can stand on it comfortably, and then they can sit on their feet in the winter to keep them warm.
I do have one hen who really likes to sleep in the nest box, and I do let her, but then I have to clean that nest box out almost daily.....
Hope this helps!