Minecraft wiki entry for Beginner%27s_guide, associated text: Any time you are near a village, you must sleep in one of their beds overnight, as soon as night falls. Trying to stay up overnight can expose the village to attacks by monsters, which can easily wipe out the villagers. It's okay if a villager has already claimed the bed — trying to use the bed the first time simply kicks the villager out, and then you can use the bed again for yourself. If you have a village, you should probably travel some distance from it (say, fifty or a hundred or so blocks from the edge) to make your own lair, to avoid having monsters appear overnight due to your presence. If monsters (such as illagers) do appear during the day, your best bet at this point is to ring one of the bells in the village, and hope that the village's iron golem can deal with the invasion. It is difficult to repopulate a village that has been wiped out.