The Google Ajax API playground (http://code.google.com/apis/ajax/playground/?exp=maps#map_markers) provides a nice exemple to add random markers to any map:
One possibility would be to send a reverse geocode request for every point you generate. Points over water would return a "G_GEO_UNKNOWN_ADDRESS" (602) status code. However, you'll need to test it thoroughly to make sure that it will work. It's possible that a few locations on land might be returned as unknown.
I'm creating a C# program that takes the users input as where they want to go and then based on that, it points them to a random location that matches their specifications.
"http://maps.google.com/maps/geo?q=29,-55" is the webpage that i'll use to determine if it's on land or not.. take a look at the specific "Accuracy: 0" string of the results of a page. If it's accuracy 0 then it's in the ocean. If it's 1 or higher then it's on land.
I don't know about the Google Earth API but you can achieve this another way. Download the Nasa blue marble bathymetry map and create a bitmap of sea areas. Then map these coords to long/lat and you have a way to test for seas and lakes that you can use in conjunction with the google maps api.