Bed is a miscellaneous structure which was added in the "Crab in the Bed" update.
The Bed is an extremely useful base item. It also proves useful in surviving harsh environments, like the ocean and winter. Also you can be 'AFK' For a long time. Your cold, your hunger, and your thirst will decrease slowly. Good night, little starvers.