Bed

A bed is a block that allows a player to sleep and to reset their spawn point to within a few blocks of the bed. If the bed is obstructed, the player spawns at the default world spawning location.

Natural generation
A red bed naturally generates in each igloo.

Beds of various colors generate in village houses, depending on the specific structure and biome:
 * Desert village houses can have cyan, green, or lime beds.
 * Plains village houses can have white or yellow beds.
 * Savanna village houses can have orange, red, or yellow beds.
 * Snowy Taiga village & Taiga village houses can have blue or purple beds.
 * Snowy Tundra village houses can have blue, red, or white beds.

Obtaining
Beds can be mined with any tool, or without a tool.

A bed also drops itself as an item when pushed by a piston.

Trading
Journeyman-level shepherd villagers sell 1 of 16 beds for 3 emeralds as part of their trades.

Placement
Beds require two blocks of floor space. Placement requires at least 2 blocks from the player's facing direction. When placed, the foot of the bed is placed on the block selected and the head of the bed on the block farther away from the player. $$, beds require solid blocks below them when placed. However, the bed remains in place if its supporting blocks are later removed. $$, beds do not require supporting blocks and can be placed anywhere, provided there is enough room.

Sleeping


Beds are used by pressing the button while looking at the bed.

A player sleeps by a bed during a thunderstorm, or at night (between 12541 and 23458 ticks, when stars appear in the sky). Attempting to use a bed at any other time results in the message "You can sleep only at night and during thunderstorms" or "You can only sleep at night". A player sleeps in a bed for 101 in-game ticks, or 5.05 seconds before the time skips to the next day. Sleeping in a bed with the set to   results in the player being kicked out of the bed after the 101 ticks, but does not change time of the world to day.

A player sleeping in a bed is possible only in the Overworld. Attempting to a bed in the Nether and the End causes it to explode and set fire to surrounding blocks; a bed will also explode if used in a nether biome in the overworld. The explosion has power 5, which is stronger than TNT (4), but not as strong as a charged creeper or end crystal (6). Villagers can sleep normally in any dimension.

The player must be close to the bed to sleep. If the player is close enough to click on the bed, but not close enough to sleep in it, the message "You may not rest now, the bed is too far away"/"The bed is too far away" appears.

If a "monster" is within 8 blocks of the bed horizontally (in the X- and Z-axis), and 5 blocks vertically (in the Y-axis), the message "You may not rest now, there are monsters nearby" appears and the player is prevented from sleeping (including in Creative mode) until the monsters leave or are killed. Most hostile mobs, as well as some neutral mobs prevent players from sleeping, as shown in the table below.

The player also cannot sleep in a bed occupied by another player, resulting in the message, "This bed is occupied".

$$, a player also cannot sleep in a bed being used by a villager. The player may first wake the villager (pressing on the villager) and then quickly enter the bed before the villager can lie down again. The villager reclaims the bed after the player wakes. $$, the villager is kicked out of its bed when a player attempts to sleep there.

A player also cannot sleep while on fire or while poisoned.

If all sleeping requirements are met and the player enters a bed, the player is positioned in the bed. The player falls asleep as the screen fades to black. In Bedrock Edition and Legacy Console Edition, the sleeping animation slowly lowers the player into bed.

Once all players in a world are asleep, after 5 seconds (101 ticks) the time of day changes to sunrise.

During this time, the chat window is focused, and the player can leave the bed by clicking the Leave Bed button.

Waterlogged beds cannot be slept in unless the player or villager has the or  status effects. Attempting to use a waterlogged bed otherwise will not display any message.

Beds displaying an error above the hotbar is a feature exclusive to beds; other blocks which cannot be used do not display such a message.

Passing the night
Sleeping changes the time of day to sunrise and resets the weather to clear weather. The player wakes up next to the bed, facing west.

Sleeping does not accelerate processes that take place over time such as the growth of crops or smelting. If is , the player instead wakes up in the night.

To skip the night in multiplayer, all players in the Overworld must be in bed at the same time. Pressing the Leave Bed button is not necessary in this case.

If the bed is destroyed while the player is in it, due to for example an explosion or by another player, the player wakes prematurely and the night does not pass.

Setting the spawn point
Once a player has entered a bed, their spawn point is set to the location of that bed.

$$, a bed in the daytime likewise sets the spawn point, without actually entering the bed.

$$, the message "Respawn point set" is displayed in chat when the respawn point is successfully changed.

The bed is in no way tied to a player's spawn point – the game only checks for the presence of a bed at a player's spawn point at the time the player respawns. The bed may be destroyed, replaced, reoriented, etc. and still serve as a spawn point for players so long as there is a bed in that location at the moment the player tries to respawn. If a player's bed is destroyed, or if the area around the bed is made unsuitable for respawning, a message is displayed saying Your home bed was missing or obstructed, and the player respawns at the world spawn point.

For a bed to be usable as a spawn point, the player must be able to stand next to the bed at the same level as it. There must be a solid block at the same "floor" level as the bed, with 2 transparent blocks of space (for example, air) for the player to stand in, in one of the ten blocks that surround the bed. It does not matter if the bed itself has blocks above it.

Bouncing
Falling onto a bed bounces the player with 66% strength – the bouncing-up velocity is 66% of the impact velocity. The player also takes 50% of normal fall damage.

Baby villagers bounce on beds during the day.

If the player is falling while sleeping requirements are met, and presses on a bed within reach before hitting the ground, the fall damage is delayed until the player wakes.

Housing
Beds are used to count the number of houses in a village, with one bed equating to one house.

Curing
Beds speed up the curing process of zombie villagers.

ID
Java Edition:

Bedrock Edition:

Block data
In Bedrock Edition, beds use the following data values:

Block entity
A bed has a block entity associated with it that holds additional data about the block.

Trivia

 * If the player quits the game while sleeping, upon return the player wakes beside the bed.
 * The player's avatar clips just slightly into the bed if they have something in their hand and their feet protrude off the edge.
 * Using the command while another player is sleeping still teleports the sleeping player, but the player wakes immediately.
 * If the player places a bed on ice, running over the bed acts like running over ice, similar to slabs.
 * Before differently coloured beds were added, using all 6 planks and all 16 wool combinations, there were 3,456 different ways to craft a bed.
 * When placed using the command, only one half of a bed is placed, since beds are two blocks wide. A single half can be slept in like a whole bed.
 * Villagers can sleep in the Nether and the End without causing the bed to explode.
 * If the player crouches while attempting to sleep the player gets inside the sheets.
 * While the block state used to determine the half of a two-block block such as doors and double-tall flowers is called half, in the case of beds this is inconsistently called part.