Five weeks of age makes a difference. I have had brooder raised chicks sleep on the roosts as early as five weeks, but 10 to 12 weeks is more the average. Some have gone a lot longer than that.
I agree it is a good idea to block of the nests until they learn to sleep on the roost. The roosts need to be noticeably higher than the nest also. Once their roosting instinct kicks in they normally like to roost on the highest spot available, but some will get in bad habits and get stuck in the nests. Once they get in the habit of sleeping on the roosts, they normally stay up there.
If they have not learned to roost by the time they are 14 weeks old, I suggest going out there at night in the pitch black, using only a flashlight, and set some on the roosts. Usually all it takes is for one or two to learn to roost and the others soon follow.
Your goal is to have them roosting by the time they are 16 weeks old. It is pretty unusual but I have had some start to lay by 16 weeks. Most are still weeks away, but since 16 weeks is possible and you need a goal, 16 weeks it is. When a pullet is getting ready to lay, her body is going through a lot of changes, both physical and hormones kick in. About a week before she starts to lay, most pullets start looking for a place to lay. Not all do this but most do. Some drop their first eggs from the roost or just walking around the coop or run, but a large majority have control from the start. You want that first controlled egg in a nest of your choosing. If she gets in the habit of laying somewhere else it can be hard to break that habit.
Occasionally you will see a chicken that normally sleeps on the roost move to some other place, sometimes the nests. What normally happens here is that another chicken is being a brute on the roosts as they settle in for the night and that chicken looks for a safer place to sleep. I’ve seen that happen with broody raised chicks that are used to sleeping on the roosts with her protection but after they are weaned, they no longer have her protection. I put in a separate roost, lower than the main roosts and separated a few feet horizontally so they had a place to go that was not my nests. This is another reason I want to open the nests before they start to lay. If I am going to have one sleeping in the nests, I want to know so I can do something about it before I get poopy eggs.
Good luck with it. At five weeks it’s not a huge problem, but you do need to break them of that habit.