They will figure it out. Mine slept on the ground of the coop for a while before starting to roost.
The bigger issue is making sure they know to go back into their coop, where they are safe. It took mine a few days to learn that - I had to wait until they settled down to sleep at dusk and pick...