A gas bubble on an electrode is like a balloon that wants to fly away but is held by a string. In experiments with hydrogen on a platinum wire, a millimeter-sized bubble hung near the surface, even though by all calculations it should have detached long ago.
The key is that tiny bubbles are constantly being born next to the large one. When the big bubble tries to rise, it bumps into the little ones and merges with them. After each merger, the bubble jerks sharply downward. A single jerk is weak, but there are many of them.
Why does a merger push downward? When two bubbles of different sizes merge, their combined surface area shrinks, but unevenly: the liquid near the smaller bubble is slowed more strongly. This creates a short impulse directed toward the surface. Many such impulses add up to a steady force that balances the buoyancy of the water. Now that the mechanism is understood, engineers can control bubbles in electrolyzers by adjusting the current or the electrode surface, so that bubbles don't interfere with operation.
A millimeter-sized bubble held at the electrode can result from up to one hundred thousand coalescence events with microbubbles, each lasting less than a millisecond.
Controlling bubbles through cascade coalescence resembles science-fiction technologies where microscopic robots collectively hold macroscopic objects, though here the bubbles themselves play the role of the robots.