Basically, the force between two magnets depends on how far apart they are and what angles they're turned at. Of course, if there is something else around exerting forces on the magnets, you might lose track of the direct force between them. That happens if there's, say, a piece of iron between them. They magnetize the iron, so there's now another magnet around. Whether it makes the net force on each magnet bigger or smaller depends on how they are arranged. Since water is almost completely non-magnetic, it just doesn't make any significant extra magnetic force on the magnets. All you get is the same force there would have been if they were in air or in a vacuum. so it is clear that magnets don't demagnetise underwater.it works underwater