Mine slept in a pile in the brooder even after I added a roost but now prefer roosting. They leave the coop as soon as they get off the roost to go out into the yard and don't go back in until dusk except to lay. Funny thing, though we have two boxes three of them insist on using the same box and, even if the other box is unoccupied, they will sit on the roost (complaining) until it's their turn
The reason they stopped sleeping on the floor might be because I blocked the nest boxes until they started laying and I don't use deep litter, just spread sand on the coop floor which I clean up with a cat litter scoop (later in the morning when I am actually awake).
To answer you question, other that sleeping in each others poop, which probably bother people more than it bothers chickens, can't see any reason that they shouldn't sleep on the floor in a secure coop, it's just that most chickens prefer to roost.