If it were my hens , I would not let them do that, because
they are more likely to get eaten( and are much safer in
a chicken pen.)
How many chickens do you have ? (It it is difficult to get 24 hens back into
their chicken coop at night) , but if you have 4 or five like I do it is easy.Just herd them in.
How long have you had your chickens (or did you just get a new chicken pen?)
When I first got my 4 hens, I left them in the chicken tractor for a month or so,
so that they would get used to this as their home .......and go back to roost at night .
I fed them no other place BUT the coop, so they would know where their food was. It might be helpful if you feed them in the coop before bed . Just call them the coop and feed them(make sure all of them are there, first) and then quickly close the door. I free range them
now, and I have no problem with them roosting in trees at night. They go straight back to the chicken pen
when it gets dark. Make sure your chickens have access to the coop at night ( make sure the door is open and all that when it is time for them to go to bed).
It's best in the first instance when you get chickens to lock them up in the coop before letting them out. They then begin to feel secure in this coop and will recognise it as a place to roost, lay and run to if they feel any threat from predators.
Chickens will generally take themselves off to bed when it begins to go dark which makes it easy to make sure they're all in the coop and safe so you can close it up for the night. It might help if you have a roost bar in your coop. Chickens like to get up high at night.
Good luck !
I hope this helped you some!
FarmGirl