Perching is the natural way for a bird to sleep. It helps prevent external parasites and keeps them from lying in their own droppings. You also don't want them to start sleeping in the nest boxes - these are for egg laying.
As a rough guide, there should be a minimum 20 cm of space per bird (30 cm if you have large birds), with a perch width of appx 4-5 cm, slightly rounded at the sides for ease of grasping.
The perch should ideally be placed higher than the nest boxes so that the chickens are not encouraged to sleep in the latter.
If there is more than one perch they need to be arranged in such a way that chickens are not directly below each other (because of their poop, and their pecking order).
The perches should be easy to remove for ease of cleaning. A droppings board beneath the perch is useful for catching droppings in such a way that they are easily removed by sliding out the board.