How to make the ocean become increasingly dark?
Use a volumetric shader plugged into the volume output of a material.



Add you flavor of surface shader to your liking like a glass, refraction, or mix of transparency and glossy.

Then add a Volume Scatter or Volume Absorption to the Volume socket of the material and adjust both its color and density to your liking.