William
Lake of the Ozarks

Almost all water heaters have "anode rods" which protect the water heater from corrosion. These rods, in a cathode-anode reaction, produce excess ions that wear off the anode rod and adhere to the inside glass lining of the water heater, preventing corrosion. The greater the activity of the anode, the greater the amount of hydrogen ion and hydrogen sulfide gas can be produced, particulary if there are high levels of sulfate in the water, which is common. Iron and sulfur bacteria are often present and make the problem worse.
Fortunately it is easy to add some peroxide (or bleach) to the water heater using a special type of hot water spin-down pre-filter. Simply unscrew the pre-filter, add 1 pint of peroxide and turn the water back on. The peroxide kills bacteria and practically instantly destroys all odors. After the peroxide has worked on the odor and bacteria, it breaks down into oxygen and water. Chlorine bleach will work too, but not as well as peroxide.