I thought about this as well. Running water neutralizes/grounds magic, as in Death Masks when Harry is being drenched in a constant stream of water. But does all water (i.e., lakes, streams, Gulf of Mexico, etc) totally neutralize magic? I can't see it being a relationship of distance from ground to running water, as, again, in Death Masks, Harry is only a few feet off the ground, but he can't cast.
Perhaps it is more a function of "running" water, water that is moving in a constant stream (no pun intended), instead of a "sedentary" body of water (like a lake or pond, can't justify an ocean/sea in this category personally)?