Aiming at the problem of low network coverage when the surface sensor is randomly deployed, a virtual distance coverage algorithm of wireless sensor networks for the water environment is adopted to improve the coverage of the network under the premise of ensuring connectivity. In the virtual distance algorithm, each sensor node is influenced by three virtual distances, which are the virtual distance between nodes, the virtual distance between the unregistered region grid and the node, and the virtual distance between the boundary and the node. The simulation results show that the algorithm can effectively improve the network coverage. It can be concluded that the virtual distance algorithm improves the network coverage effectively by optimizing the control of the node position, so that the deployment of nodes can be optimized.