Is it harmful to have sexual relations in a pool or the ocean?

Yes and no. Underwater sex usually leads to lack of lubrication which can lead to painful sex for both partners. Furthermore, the water can rinse out beneficial bacteria in the vagina that can then lead to bacterial vaginosis (a fish vaginal discharge). It might be fun, but be prepared to visit your doctor afterwards. And don't get caught!