How to move an object over a deformed surface and make in follow the surface?
Create a plane with enough subdivisions, and give it a shrinkwrap modifier with target ocean. Add a vertex group with all vertices to the plane.
Then use copylocation constraint on z-axis to your boat and the vertex group. Hide your plane.