Let p(x) be the atmospheric pressure, starting at x = 0 (sea level). Write p(x) as c times the integral of p(t) as t runs from x to ∞. Here c is an appropriate constant of proportionality. Differentiate to show p′(x) = -cp(x). Thus the change in pressure is proportional to the pressure. It must be an exponential function; p(x) = kE-cx, where k and c are constants.
Unlike air, water is virtually incompressible. The density does not change as you descend to the bottom of the ocean. Hence the pressure is proportional to the depth.