Well, if it's fresh water...
I sunk my magic air into about three feet of (clear) river water (smart, huh?). It took me about 30-45 seconds to get it out of the water.
Very first thing: - Try to turn the battery off. Since it didn't in my case, a simpler solution: take it out (see later..)
Then - There's a lot of people on various forums saying the rice trick is a myth. I wonder if they've actually got any experience of this. Here's what I did. Firstly, having already taken the battery out, I got a hair dryer, and set it on its side, pointing at the drone from a reasonable distance. By this, I mean I could hold my hand in the air stream without it being painful in the least. Clearly you do not want to melt your drone. I let it run for half on hour or so on each side in turn. I set the thing upside down, I opened the port for the SD card and USB connector etc etc. After an hour or two of this, I put a fresh battery in and gave it a go. It worked for a short time but the sensor cameras were fogged up. Here's where the rice comes in - I wrapped the drone in a cloth (muslin/cheesecloth kind of thing) and then buried it in a bucket of rice. First put a layer of an inch or so into your container, then the drone, then cover it. The key is patience - 18 hours (for me) later, all that fogging that had been in the sensor lenses was gone. I fired it up, and, after calibrating the IMU, the obstacle sensors, & the compass, everything is fine. Except the battery that was in the machine when it got submerged...
But, I put that battery through the cloth and rice trick (for only about six hours) and it's now fine too.
I think the main things are:
Don't be an idiot like I was.
But, if you do have an accident, act as fast as you can - switch off/remove the battery, get blowing warm air at it/sink it into rice as soon as you can.
And good luck!
ps, I was fairly hopeful about the rice thing since my wife had fixed her iPhone some years ago after a trip into a kitchen sink full of water. Obviously the mavic is a different beast, but for sucking moisture out of confined quarters, rice really does do the job.