If they are not laying yet, they don't need access, so I would block off the nest boxes until closer to the time they need to be in them. Nest boxes are often a preferred place to sleep because they seem private and safe.
What I did to block mine off is this:
Sorry - not a great photo, but what it is, is feed bags tacked to the front of the nest boxes. I did this because I have a mixed age flock and the laying hens needed access, but the younger birds wanted to sleep there at night. So I tacked the feed bags to the front, allowing me to pull them down like a curtain over the front of the boxes by night, but fold them up to open up the boxes during the day.