I always trained mine from when they were little to sleep in the coop. There was a period of time where they decided they wanted to sleep on the fence, but I just gathered them every night and put them back in the coop. Now they all sleep in there without fail.