Aiming at the problem of wireless sensor network node coverage optimization with obstacles in the monitoring area, based on the grey wolf optimizer algorithm, this paper proposes an improved grey wolf optimizer (IGWO) algorithm to improve the shortcomings of slow convergence, low search precision, and easy to fall into local optimum. Firstly, the nonlinear convergence factor is designed to balance the relationship between global search and local search. The elite strategy is introduced to protect the excellent individuals from being destroyed as the iteration proceeds. The original weighting strategy is improved, so that the leading wolf can guide the remaining grey wolves to prey in a more reasonable way. The design of the grey wolf's boundary position strategy and the introduction of dynamic variation strategy enrich the population diversity and enhance the ability of the algorithm to jump out of local optimum. Then, the benchmark function is used to test the convergence performance of genetic algorithm, particle swarm optimization, grey wolf optimizer, and IGWO algorithm, which proves that the convergence performance of IGWO algorithm is better than the other three algorithms. Finally, the IGWO algorithm is applied to the deployment of wireless sensor networks with obstacles (rectangular obstacle, trapezoidal obstacle and triangular obstacles). Simulation results show that compared with GWO algorithm, IGWO algorithm can effectively improve the coverage of wireless sensor network nodes and obtain higher coverage rate with fewer nodes, thereby reducing the cost of deploying the network.