When near bodies of water, place your gadgets and important things in waterproof bags and/or secure them. And of course, never place your wet stuff in the same bag as all the other things that you have been trying to keep dry.
During a trip to Balabac, a friend lost two things on different days. First, his sunglasses fell in the sea without him noticing. Second, his smartphone fell from his pocket while he was helping another friend board the outrigger boat. He was able to fish the smartphone out, but it was beyond repair.
The second advice is common sense. But sometimes, in excitement, common sense escapes. Like in the case of another friend who had stuffed her dripping snorkel in the bag where she had her smartphone!