A recirculating hot water pipe loop would solve the problem, but most homeowners don't install one because it requires a pump, an electrical line and can be tricky to plumb. Instead, many people turn up the water heater thermostat. It doesn't cost much. The Dept. of Energy says annual operating costs of 50-gallon, gas-fired water heaters is $375. Because a 10-degree rise represents only about four percent of the bill, the thermostat increase costs just $15 to $20.
Scalding risk is why the Environmental Protection Agency (EPA) and most water heater manufacturers recommend a setting no higher than 120 degrees. There are two exceptions. One is the hot water supply for dishwashers. In most modern units it's boosted by a heater in the appliance to 140 degrees to improve sanitation. In models with stainless steel interiors it can be boosted higher. But in standard models the plastic tub walls can start to deform at about 150 degrees.
The other exception is a misleading number that pops up on many plumbing Web sites: a setting of 140 degrees recommended by the Occupational Safety & Health Administration (OSHA). It's misleading, first, because OSHA regulates the workplace, not private homes. Second, the 140-degree setting is intended mainly to guard against Legionnaires' disease bacteria in commercial heating and cooling plants. But the clincher is just common sense. Yes, 140 degrees might better guard against breeding an unusual disease in your hot water system, but cause many scalding burns in the process. It's not a reasonable tradeoff.
Unlike furnace and air conditioning thermostats marked in degrees, water heater thermostats typically are marked warm to one side and hot to the other. Actual temps vary, but warm is usually 90 to 110 degrees, and hot is 140 to 150 degrees. Temperature also varies from the thermostat setting up to 20 degrees in the tank — plus 10 as the burner finishes heating and turns off, and minus 10 when the tank has cooled and the burner relights. Instead of guessing, let hot water run a minute or so at a fixture, use a candy or cooking thermometer to measure the temperature, and then adjust the thermostat as needed according to instructions in the owner's manual. On the warm-hot scale it may take a few tries until you find the setting that delivers 120 degree water at the tap.
On electric water heaters the thermostat is buried beneath a removable plate. Many units have two thermostats, one for the top heating element and another for the bottom. Following the owner's manual, shut off the power, remove the panel, and push away any insulation to reveal the thermostat. Most adjust with a flathead screwdriver, right to increase the temperature and left to decrease it. Whatever the calibration (you may see hash marks and no numbers), you'll want to check the water temperature at a faucet once you've changed the setting and let the system resettle for about three hours.