Minecraft wiki entry for Superflat_survival, associated text: If you have wood, craft a bed and sleep to avoid phantom spawning. You can also sleep and leave the bed not only avoid phantom spawning but also to not past the day. If you don't have wood to craft a bed, you cannot sleep and phantoms start spawning on the fourth night. Fortunately, since classic flat only 4 blocks deep, and phantoms only spawn and swoop down if the player is at altitude 64.