Have a look the this link...
Bradford White Hydrogen Sulfide Odor and Chlorinating Water Heaters (#109)
I have a periodic but often problem of my hot water stinking, smelling alittle like sewage. My first thought would be problems with our local water supply, but IT'S ONLY THE HOT WATER. Not the cold water. And the hot water doesn't stink when you first turn it on and cool water is coming out; it only stinks once if finally gets hot.
Someone had told me that my water heater may be bad, but I've never heard of this happening to anyone else. Is it possible my water heater is doing this?
Install a zinc/tin/aluminum alloy anode and/or install a chlorine injection system.
An extreme but guaranteed solution would be to replace the unit with an anode-less heater such as a Rheem marathon (plastic tank) or a tankless heater.