There is more to it than that. First, though some here may not like it, you can remove that rod altogether. Following Dave G’s suggestion on draining the tank, remove the rod (being careful not to break any of it off). You should be able to locate it with a drawing that is in the water heater manual. Add 1 cup of household bleach (unscented kind), refill the tank and allow that to sit with the water in the heater for 1 hour then flush until the chlorine odor is gone. The “mag rod’s” primary purpose is to prevent corrosion of the metal in the water heater. Most all water heaters today are lined and the mag rod is not really necessary. It would be if the tank lining is damaged. If you have a concern about that you can replace the mag rod with one made of aluminum.
There is another potential player in the water called a Sulfate Reducing Bacteria (SRB) that may be in your well water. This is not a harmful bacteria. It is the primary causer of that odor. You can get some relief by occasionally shock chlorinating your well water. I assume you are on a private well. If on municipally treated water you wouldn’t have to do that.