Why is my water heater losing heat?

Andrew S
by Andrew S
Over the past year or two we sometimes have had no hot water in the morning, but the occurrences have been irregular. Over the past month, it has been constant, so I turned up the temperature on the water heater and now it's working fine.
I am guessing there is something wrong with the gas valve or thermostat or something. Expert opinions welcome.
  8 answers