There is no specific rule
The Basic rules impose limited restraints on a creature that's underwater: Movement speed is halved for creatures without a swim speed, most melee weapon attacks also have disadvantage for those creatures, and ranged weapon attacks are limited to the 'normal range' of the weapon (i.e. the first number of the two given for weapon range). (Basic rules, p.8)
In fact, the only other rules I know of with any bearing upon hiding underwater are on page 117 of the DMG, under the heading Underwater Visibility. These rules explain that creatures who are underwater will only be able to perceive enemies who are less than a certain distance away, depending on visibility conditions.
There is a general rule: Imposing disadvantage
5e is light on specific rules for particular cases, and prefers to equip DMs to make rulings in response to the actions of their players. One of the best tools provided for this is the ability to impose disadvantage when 'circumstances hinder success in some way' (DMG p.239).
If a character is attempting to use their invisibility to hide whilst underwater, you could impose disadvantage of their stealth check to reflect their difficulty in so doing*. If spotted, they would still be unseen, but they would no longer be hidden - the main difference is that an enemy would know enough about their approximate location to target them with a disadvantaged attack.
* I'm assuming here that it would be more difficult to remain undetected underwater, since that's the assumption in the question. I have no idea if it's true or not.