Beds appear primarily in Skyloft and can be slept in order to restore hearts or change the time of day. Link has his own bed in his room at the Knight Academy, though humorously he is able to sleep in the beds of other characters, as well.
Beedle's Air Shop has a bed that Link can sleep in it to visit Beedle's Island at night. Additionally the beds in the Lumpy Pumpkin can be used to visit Pumpkin Landing at night. These are the only locations outside Skyloft that can be visited at night, as Link is unable to fly his Loftwing after dark.
In the 3DS remake of Ocarina of Time, Link can sleep in his bed in his house to restore health. It also allows him to battle bosses he has previously defeated.
Beds can be found mainly at Inns, Stables, the Woodcutter's House, the archeologist's cabin at Fort Hateno, Hebra Trailhead Lodge, Selmie's Spot, Pondo's Lodge, and in Link's House, once he purchases one. Like Campfires and Cooking Pots, they can be used to pass the time to morning, noon, or night. However unlike Campfires, sleeping in a bed restores Heart Containers. Some inns even off special beds or additional services that add temporary yellow hearts or a yellow stamina wheel though cost more than the standard bed. While most inns require Link to pay to sleep the Deku Tree's Navel Inn in Korok Forest allows Link to sleep for free due to the bed in the inn being made especially for him to sleep in due to his heroic status. Link can also sleep for free in the beds found in the Woodcutter's House, the cabin at Fort Hateno, Hebra Trailhead Lodge, Selmie's Spot, Pondo's Lodge, and at East Reservoir Lake.
As part of the "Hylian Homeowner" side quest, Link can purchase a house for himself from Bolson in Hateno Village for 3,000 Rupees and 30 bundles of Wood. After purchasing the house, Link can sleep in his bed any time he is in Hateno Village. However free beds do not offer any benefits other than health restoration and passing time.