Most chickens will try and roost on the highest thing they can get to even if it is a dangerous location, they ain't got much sense sometimes. It can be a lot of work to keep them from roosting on the highest perch and pooping on everything below it. I have just recently had some birds grow big enough that they tried to roost on top of a half wall, then they went on up on top of the water bucket that's mounted to the top of the wall. I used chicken wire to block all these areas all the way up to the ceiling. Went in the coop one night late and one of the birds had climbed the wire trying to get to the top and stuck her foot through the wire and fell backwards with her foot hung in the wire. If I hadn't gone out at midnight to check on them no telling what shape she would have been in the next morning.
I thing she did the same thing a couple days later and fell off the wire 8ft down to the ground. When I went out on my late night check she was in the floor kind of walking around with a dazed look and it took her about 30 minutes to finally jump up on the lowest roost pole in the coop. I have some older birds in another coop that try to roost on top of the doors that are supposed to remain open and I haven't figured out how to stop them from this yet.
I saw in a large egg laying operation where they had a tight little wire stretched over there system of waters and they called it an anti roosting wire, it kept the birds from roosting on the plumbing for their waterers. I tried this on top of my doors and it hasn't worked yet. I thought it had but they were back on top a couple days later, I've got more thinking and figuring and work to do!