Which is discharged?
Mercury has a high overvoltage for hydrogen evolution; that means a barrier exists so that molecular hydrogen is not formed easily. Evolving hydrogen requires two protons to be neutralized, get together to form a molecule and clump up with a few more hydrogen molecules to form a gas bubble. If a sodium cation is neutralized right next to mercury liquid, it can quickly amalgamate/dissolve into the mercury, where its activity is much reduced. Sodium amalgam reacts with water, but much slower than metallic sodium reacts with water.
Similarly, ammonia amalgam can be made by electrolysis, and the mercury will foam up - it's not very stable.