Resting

Resting is used to heal in a safe place without the need to use Stimpaks or healing skills. The player is unable to rest if there are enemies nearby, the player is being irradiated, or if the bed is owned.

Fallout and Fallout 2
In Fallout and Fallout 2, you can rest in any place, as long as you're not in combat, using the Pip-Boy 2000 alarm clock function.

Fallout 3
Beds are used to heal completely by sleeping. You can not sleep in an owned bed, but if the owner dies the bed usually reverts to an unowned state. Many raider camps have beds that can be used after killing the raiders. Sleeping for any amount of time in a bed will heal your health and any crippled limbs, but will not get rid of any rads you have accumulated.

If the player wishes to pass a period of time but there is no bed nearby, he can wait for up to 24 hours. This allows the player to use shops that are closed at certain times or pass in-game time for any other reason. Health is not restored as it would in sleep, and if there are enemies nearby you will not be allowed to wait.

Well Rested
If you sleep in an owned bed (such as in Megaton house, Tenpenny Tower Suite, Kenny's Cave, or renting a room) you will become "well rested" and gain a 10% bonus to experience gained for 12 hours.

Free Locations

 * Probably the quickest way to a free bed is to quick travel to Big Town. There is a free bed just a couple of steps away from the point you arrive near the Guards chair at the entrance.
 * Grayditch. Quick travel there and you will find free beds in both Brandice's house right next to where you arrive and in Wilks' house right across the street.
 * Residence area of Vault 106, after you kill the insane survivors.
 * Arefu, In the last house, named the West Residence.
 * Inside the Jury Street Metro Station, initially guarded by 3 raiders.
 * At the Super Duper Mart, in the ladies room & near the pharmacy, initially guarded by 2 groups of raiders (one roaming, one local). Also expect some action when you fast travel to the location, just run inside if you are too damaged and sleep first.
 * With The Family in the Meresti Metro Station, upstairs. Watch out for the mines on the way in.
 * Just south of Dukov's Place, in the little raider camp. Initially guarded by 2 raiders. Some strong but stupid Super Mutants nearby. To defeat the Mutants: Try to lure one to you, watch out for his firepower, hide behind a pillar, use a Shishkebab to set him on fire, and eat away his health. If he tries to shoot at you, hide again, behind your pillar.
 * The houses in the Minefield can be unlocked and contain many beds inside, you may want to get rid of any mines and the sniper first though.
 * In your Megaton house, after you complete The Power of the Atom by disarming the bomb. If you detonate the bomb, the house is (obviously) destroyed.
 * In your Tenpenny Tower Suite, after you complete The Power of the Atom by detonating the bomb. If you disarm the bomb, you will never receive the key to the suite.
 * Springvale School, directly in front of you as soon as you enter- it has a corpse and some bits of victims lying around it, but it is still usable. Fast traveling to the location will place you directly in front of the door you use to reach the bed. Note that you'll have to clear the raiders from that floor first, but once this is done, it should no longer be a problem.
 * Having trouble in the downtown DC area? Super Mutants and Talon Company whittled down your health? Look around for any residence- usually there is one, and it will have a bed inside. Since it is a new map area, you can duck in out of a firefight and sleep with no interruptions.
 * There are two cots and non-respawning footlockers in Rivet City's common room, on it's Midship Deck.
 * The article Fallout 3 player housing also provides numerous locations with "free beds".

Hotels

 * Megaton, Moriarty's Saloon, Nova, 120 caps.
 * Rivet City, The Weatherly Hotel, 120 caps.
 * Underworld, Carol's Place, 120 caps.

add-ons
The Point Lookout add-on provides an additional Well Rested bed in Kenny's Cave, provided you pass a speech check, have the Child at Heart perk, or retrieve Kenny's special Teddy Bear.