A coverage optimization method based on an improved sparrow search algorithm (LSSA) is proposed for the coverage problem arising from the initialization of wireless sensor networks. Firstly, the good point set method is used for population initialization to make the sparrow individuals uniformly distributed, and the algorithm can effectively avoid falling into the local optimization. Secondly, a nonlinear convergence factor is proposed to constrain the proportion of producers and scroungers, which ensures the diversity of the population during the search process and improves the solution accuracy. Finally, the location update method of producers is improved, and the algorithm’s convergence speed and optimization performance are improved by balancing global search and local search. The simulation results show that the improved sparrow search algorithm effectively achieves the optimal node deployment and improves coverage rate and convergence speed.