I never could swallow all that comets-hitting-the-Earth-filled-the-oceans nonsense.
Due to plate tectonics, the water below the surface was once on the surface. It still could have come from comets and asteroids. At any rate, water was part of the nebula surrounding the sun from which the planets formed.