Shut off the cold water valve drain some water from the tank, open one of the nipples, and dump in a few pints of hydrogen peroxide. Close everything up and let some water run from all spigots and taps.
The smell is caused by anaerobic bacteria. The peroxide adds oxygen to the water, killing them. Running the water gets the peroxide into your pipes and kills the bacteria there.
But, if it stinks at one sink, but not all of them, dump the peroxide down the basin overflow, instead of into the water heater. Sometimes bacteria can build up in there, too.
The peroxide will kill the bacteria for the time being, but more is coming in all the time and the next time you leave for a few days, the problem will return.
One solution is to replace the magnesium or aluminum anode -- which reacts with the bacteria to make the stinky hydrogen sulfide gas -- with a zinc/aluminum alloy rod. In many cases, this will eliminate the odor. Turning up the water heater to 140 degrees will also kill this bacteria growth as well. I only recommend this for a short period of time. Anode rods are the "sacrificial" rod inside the tank so that the water attacks the rod, not the tank.
Most tanks are glass-lined but they are done in a fashion that doesn't thoroughly cover all areas of the tank, especially gas water heaters with a center flue chase. I've seen how they do it; a spinning wand down the hot and cold inlet/outlet ports. Takes all but 4 seconds for them to do it and is not very effectively orchestrated. If they took more time and checked their work, it would probably make the tank last a great deal longer. Possibly the reason why the old OLD water heaters lasted as long as they did, they cared about the product they moved. Now it is all about job security and make it last past the warranty expiration.