Villagers are not always going to sleep at night. Opening GUI with them usually fixes it, but sometimes it takes multiple attempts. It also appears that they are not sleeping in the same bed afterwards. Maybe they are losing their beds and player interaction resets that...
Duplicate of MC-151376