Waves are formed on the sea's surface at the boundary of water and air. Water is heavier than air, so when the surface of the water rises up or is depressed, restoring force comes into play and attempts to put it back into place. This is what causes waves.

The same thing happens when the density of water increases gradually with depth. If you push a block of water at a certain depth down, buoyancy results, and if you push it up, force in the opposite direction (down) occurs.

Whether or not the change in density is

gradual or otherwise,

if the area is stably stratified, then waves still occur.