Actually IR DOES work through water . . . and glass too.
I tested it out last week on my robot fish inside a fish tank. I placed my IR rangefinder outside of the fish tank, and it can detect the distance of my robot fish from the edge of the glass.
I have not yet tested accuracy loss or for other weird effects yet. Will get to that later. I would expect some kind of refocusing, meaning I would need a special calibration and can expect a lower accuracy.
The problem with any sensor underwater however is that murkiness and bubbles in the water will reduce sensor quality - not even the human eye could avoid that issue.