Hot water heaters that emit a sulfur odor most commonly have an anaerobic bacteria in the water. This bacteria comes in contact with the aluminum and magnesium anodes to produce the sulfur smell.
Eradicating the smell completely requires replacing the aluminum and magnesium anode with one made with a zinc alloy. If this is not feasible, turn off the cold water and drain the hot water by turning on a faucet. Once drained, add peroxide to the plumbing on the hot water heater. This does not permanently solve the problem but does provide some relief. The smell returns once water sits unused in the hot water heater.