Waypoints in Litchi and other similar apps use terrain data from Google Earth (Google's Elevation.api) and other sources, so it doesn't make any difference whether your drone is over water, rocks, sand, trees, grass, or marmalade. Whatever those sources think is "ground" at that location is the reference point that Litchi uses.
That terrain data in turn comes from a variety of measurements ... some from satellites, some from various mapping sources, and some from aerial photography. Not all of it is absolutely accurate. For example, the deep and fairly wide ravine that runs across my mountainside lot is not accurately profiled in Google Earth even though the resolution here is as good as I've seen anywhere ... as far as depth goes, the ravine just sort of gets averaged in with the surrounding terrain.