In Super Mario 64, Mario has a new power meter with eight wedges. On land, when he gets damaged, wedges are removed, and when he collects coins, the wedges are restored. Underwater works mostly the same way, except health is removed as Mario is holding his breath, and is restored when he takes a breath. It just so happens that you can use this mechanic to your advantage. First, injure Mario as much as you want.
Then, find some water. Hop in and get Mario positioned so that he's treading water with his head just above the surface and blam!
Full health!