Steve,,, I am told it is a reaction between the electrical heating element and the anode rod. (Something to do with electrons.) The anode is only being used during the electrical heating process which is internal electrical. The gas is external heat to the metal tank, not the water itself. The anode is softer (lead and aluminum I think), so it will sacrifice itself and deteriorate before the metal of the tank. Also the type of water plays some part ... I bought an electric water heater for home a few years ago and it was always making noise and putting gas or air in the lines....called manufacturer and they sent me a different anode rod and it no longer made the gas or noise. (The original rod cost 15 or so and the one they replaced it with has a price of about 55 bucks.) The manufacturer told me it depended on the type or quality and content of water as to the life of the anode rod.
I don't think that there is any direct reaction between electrical heating and the anode, but I am open to any information on this. The electric element is well insulated from the tank water, so no electrons should be escaping. The anode does it's thing (behaving as an anode) regardless of what kind of heat source is being used, and when no heating is taking place. The noise could be from two sources,
1. From localized boiling at the heating element, similar to the noise you sometimes get when turning an electric kettle on. Tiny steam bubbles are formed at the element surface (nucleate boiling) which break free and then collapse making a noise. Scale on the element may alter the boiling noise. The scale will usually break off and fall to the bottom of the tank. It's need to be flushed out regularly. If the tank thermostat has drifted high, causing higher water temperatures, more boiling will take place. If your water temperature is hotter than normal, then this maybe the cause of your noise.
2. As Jim suggests, from gas release from the water at the electric heating element. Depending on the water chemistry, e.g sulphur content, gas can be formed in the water with the anode material, especially magnesium, having an impact on how much is formed. The most common gas is hydrogen sulphide, smelling like rotten eggs, it is formed by "sulphate reducing bacteria" reacting with the normal sulphate salts found in most water supplies. The magnesium anode rod will increase this reaction. The gas will be driven out of solution as the water heats up especially at the electric element surface, increasing the normal boiling noise. The element surface runs at a higher temperature than the gas heating surface so gas release would be at a higher rate. Changing the anode rod as Jim suggests may fix this. If you have smelly water, try a aluminum or zinc rod - I think that the aluminum ones are fairly common. Changing your water source may eliminate the problem also.