According to my brand new water heater, “smelly water” (their term) can be cured by turning the temperature up to 140° or above.
Of course, that temperature will probably burn the crap out of you if you’re not careful. Maybe try it and see if it sterilizes the water, then turn it back down.