Gravity is always acting and is always constant, so it acts only to set the initial depth, then all other forces are independent of it. In other words, gravity is not a restorative force, and a restorative force is needed to initiate oscillations.
Perhaps an analogous example explains better: consider a spring, constant k, one end attached so as to be immobile, the other attached to a mass m, the whole thing laying on a horizontal frictionless plane. You pull the spring a distance from its relaxed position and it will oscillate back & forth with frequency sqrt(k/m). Gravity not involved.
Now suspend the spring vertically from the immobile end. The spring will stretch due to gravity pulling on the mass to its equilibrium position. Then you pull the spring down a bit further and again it will oscillate with the same frequency sqrt(k/m). The spring-mass system is a lot easier to analyze. You can include gravity or not in your diff. eq.; you get the same result.