"Rotten egg" odors from hydrogen sulfide are sometimes only present in hot water. This may indicate a reaction with the magnesium rod in the water heater. Consider either removal or replacement with an aluminum rod as a remedy.If the temperature in a hot water heater tank is set too low, odor-causing bacteria may thrive, which results in the hydrogen sulfide odor. Raising the temperature to 140 degrees Fahrenheit for two hours can kill the odor-causing bacteria (make sure you have a properly functioning pressure relief valve or let the hot water drip out of a faucet before turning up the temperature). Upon completion, return the temperature to the desired level.Occasionally flushing the hot water heater can also help to remove the odor-causing bacteria, as well as sediment that may be adversely affecting the efficiency of the hot water heater.