How Long before the water goes from hot to warm? if its in a minute or two you might have a bad dip tube. assuming that if its left to heat up that it always starts off hot. it it starts off hot one time and just warm the next maybe your gas control valve is bad. If the heater is ten years old you may want to consider replacing it, It may not be worth working on it at this point. If you want to check the dip tube you need to remove the nipple on the cold side ( inlet ) of the water heater. you will either have a plastic tube connected to it or you have to stick your finger in the hole and pull it out. If you find no tube or its only a few inches long then you need a new one as it should be almost as tall as the heater itself.