When I got my license there were designated areas for stunt practice and it is illegal to stunt over populated areas. We went to the stunt areas to practice spins and stalls.
In terms of US law I believe this would apply though am not sure:
"14 CFR 91.303 - Aerobatic flight.
§ 91.303 Aerobatic flight.No
person may operate an
aircraft in aerobatic flight -
(a) Over any congested area of a city, town, or settlement;
(b) Over an open air assembly of persons;
(c) Within the lateral boundaries of the surface areas of Class B, Class C, Class D, or Class E airspace designated for an
airport;
(d) Within 4 nautical miles of the center line of any Federal airway;
(e) Below an altitude of 1,500 feet above the surface; or
(f) When
flight visibility is less than 3 statute miles.
For the purposes of this section, aerobatic flight means an intentional maneuver involving an abrupt change in an
aircraft's attitude, an abnormal attitude, or abnormal acceleration, not necessary for normal flight.
[Doc. No. 18834,
54 FR 34308, Aug. 18, 1989, as amended by Amdt. 91-227,
56 FR 65661, Dec. 17, 1991]"
https://www.law.cornell.edu/cfr/text/14/91.303
It wouldn't appear that being out over the open water would make a difference if (e) applies.