Bed

Beds allow the player to skip to the next dawn. They will also change the player's respawn point to be next to the bed, as long as it still exists. If you die in the Nether, you will not spawn next to your bed. It will show the "Your bed is missing or obstructed" message.

In SMP, the server will only skip to dawn when all online players are sleeping, otherwise it shows a first-person view of the player lying down, and a "Leave Bed" button.

Beds cannot be destroyed by fire.

Beds were added in Beta 1.3. The respawn feature was added in the Beta 1.4_01 update (it was supposed to be in 1.4, but it didn't work correctly.)

Crafting
''Note: You can use any colored wool. You can even use multiple colors of wool, but the bed will remain red. The only way to change bed color is a texture pack.''

Placement
Beds, unlike typical blocks, take up two blocks of space. Basic placement requires at least this much space away from the player's facing direction. Like some other blocks, beds can not be placed on snow but can be placed on leaves. It is possible to create a "floating bed" if the blocks underneath the bed are destroyed. This method can be used to place glass underneath the bed, as the bed can't be placed normally on glass. The floating bed method also allows beds placed over each other like with fences. When placed, the foot will face toward the user. Two or more beds can be placed next to each other, effectively allowing double beds.

Beds cannot be placed underwater. They can be placed in a dry area and then flooded, but trying to use one will result in the "You can only sleep at night" message being displayed. In order for the bed to be useful, it must have enough light on and around it to prevent hostile mob attacks during sleep.

Beds are 9/16 of a block high, one more pixel than half a block. This prevents you from walking onto the bed from ground level without jumping, but allows you to walk onto other blocks from the bed.

Behavior
Use a bed by right clicking on it. Attempting to use it during the day will result in a "You can only sleep at night." message, which also appears when attempting to use beds in the Nether. When used, the player is positioned in the bed and their view slowly fades to gray. After this transition, the player wakes up at dawn. If the player were to die, the bed last used will serve as the new spawn point. However, if the bed is removed or there isn't a 1x2x1 empty space next to the bed, the message "Your home bed was missing or obstructed." will display and the spawn point will be reset to the default.

To ensure that you are not awakened unnecessarily during the night, the bed must not be placed along a 1 block thick wall, unless the area on the other side of the wall is also safe. If a hostile mob can get within 2 blocks of the bed, even if the blocks are separated by a wall, you will be awakened with the hostile mob standing next to you. There appears to be a slight delay before the mob attacks you, giving you time to get the first blow.

Sleeping only changes the time of day to sunrise; it does not speed up processes which take place over time such as the decay of dropped items, plant growth, and smelting.

Multiplayer
To skip the night, all players on the server must be in bed at the same time. Players can also chat while in bed, and have the option to leave the bed before the skip happens.

If you try to sleep in a bed occupied by another player, you will get the message "This bed is occupied."

In order to change your respawn point in multiplayer, you must click the Leave Bed button before falling asleep. Sleeping all the way through the night will not change your respawn point.

Compasses
Currently, compasses will keep pointing at the original spawn point, and will not change when the player sleeps in a bed.

Trivia

 * Pressing the inventory key quickly before entering your bed allows you to see your sleeping position in the inventory screen.
 * In SMP, you can view other players in bed. The player avatar clips just slightly into the bed if they have something in their hand and his feet protrude off the edge.
 * When walked on, beds make a footstep sound similar to the block below. If the block below the bed is removed, it will still make the sound of the block that was previously under it.
 * If there is a solid block above a bed, the surface of the bed will become black, much as with slabs.
 * Placing a bed next to cactus in SMP creates a detached headrest. This can be used to create heart shaped beds and benches.
 * On peaceful mode, a bed can be used out in the open, as no monsters are present to interrupt your sleep.
 * You can get pushed off the bed, this won't alter the sleeping in any way.
 * If placed in or near a dungeon, mobs will spawn even if the spawner is deactivated by torches, and the bed is in a safe place.
 * Since you do not need to stand on a bed to use it, beds can be used as one way transportation. Using the bed through a 1x1 hole will transport you to the other side of the 1x1 hole upon waking up.
 * You can sneak walk off beds, besides being slighty taller than half-steps.

Bugs

 * If you try to place a bed above the height limit for the map, it will be lost from your inventory.
 * Hitting the bed will cause the top surface to brighten. This does not affect the light level, and it is probably a glitch in the breaking animation.
 * Many situations cause a “You can only sleep at night.” message, even if it is nighttime. These have been reported to include:
 * The bed being surrounded on all sides by blocks, or water.
 * Right-clicking on the foot instead of the head of the bed.
 * Right-clicking any part of the bed while standing more than three blocks away.
 * Right-clicking the bed while standing on top of it.
 * The bed seems to only force the camera to be in the bed; while the screen is fading out, you can still move around, break/place blocks, fire arrows, etc., but cannot see where you are or see your arm/tool. This has been called “sleepwalking.”
 * If you right-click while standing on the bed in SMP, the message "this bed is occupied" will appear. You are technically in the bed but you can walk around, and you will appear lying down to other players.
 * Moving the mouse around will cause particles on the screen to face different directions. This is because they are sprites, images that attempt to face the player's eyes (which aren't actually at that location) to avoid being seen edge-on.
 * In multiplayer, many situations can cause you to be kicked from the server for an “Illegal stance”:
 * Going to bed while sneaking.
 * Going to bed right between sunrise and day.
 * Being pushed off the bed into a block. (This will sometimes kick the pusher as well.)
 * There is a glitch in SMP where, if you switch from two beds rapidly (possibly due to connection), you can enter one bed and leave to appear near a different bed.
 * Using a bed in a room with a low ceiling can result in the player waking up with their head stuck, causing them to suffocate unless they can escape, which is likely after sneaking while using a bed.
 * In SMP, if a player gets into a bed and then another player surrounds the bed with a solid material (e.g. cobblestone), the first player will be stuck in a laying down position upon attempting to get out of the bed.
 * When a user right-clicks quickly enough in Single Player, the message "This bed is occupied" will appear on the screen. This was the third message that could be seen in Minecraft Single Player Mode and it can even be displayed twice if the user right-clicked fast enough.
 * Saving in a bed and then continuing that saved game causes the player to fall through the floor and makes the bed "occupied." This can be fixed by destroying and then replacing the bed.
 * Sometimes if you place a bed next to a wall, it will spawn you on the other side of the wall.
 * If you sneak while in bed, you can see your head while sleeping.
 * Beds can be used to sleep through thunderstorms even during the day. It's possible that the condition that must be met in order to sleep is not that it is nighttime, but that the ambient light is below a certain threshold.
 * If you sleep with the door open, your house will be unsafe and mobs will always spawn unless you destroy and replace the door.
 * If the bed is clicked on while holding a bow with arrows in your inventory, you will fall asleep and as if an invisible copy of the player is standing where you were, arrows will fire from that spot, fall through the bed and be lost forever. The arrows will not damage you.
 * If you walk very far away from your bed and then die, you do not re-spawn at your bed and instead spawn at your original spawn point, receiving the message "Your home bed was missing or obstructed".
 * Sometimes when sleeping in a bed completely surrounded by torches (including corners) you will have fallen through the bed when you wake up and begin to suffocate.