Minecraft wiki entry for Villager, associated text: All villagers head home a short time before sunset. They roam around until they get near their beds, then target a block beside the bed. Once they reach their beds, they do not go through a door again before sleeping.