If you have a pressure differential, a fluid will jet from high pressure to low pressure, where the difference is converted to the velocity of the fluid. If you have a moving fluid, you can use it to drive a turbine and generate power, which in turn reduces the fluid's velocity. Since there's a huge difference in pressure between the ocean 2km down, and the surface, you could build a pipe and a reservoir that lets you "push" the byproducts of electrolysis to the surface. Say your surface reservoir is 150 bar, and the original is 200 bar -- that gives you 50 bar of pressure to get the hydrogen to the surface, and drive a turbine to generate power for electrolysis.