Bed is a miscellaneous structure which was added in the "Crab in the Bed" update.
When standing inside a Bed, the player loses their status bars at a slower rate, and regenerates life faster. It is recommended to build this in a base, when you have plenty of resources or you are going to afk.
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. If you are wearing winter chapkas and lying on the bed in the forest, your cold bar will stop decreasing. Good night, little starvers.