Soil Temperature Wireless Sensor Networks (STWSNs) are crucial in monitoring soil temperature in cotton fields. These networks assist farmers in optimizing agricultural activities based on real-time temperature data, thereby increasing cotton yields and reducing production costs. However, achieving maximum network coverage while minimizing the number of nodes remains a significant challenge. This paper proposes an Adaptive Chaotic Gaussian Lens Snake Optimization Algorithm (ACGLSOA) to address this issue. The ACGLSOA adaptively tunes parameters to enhance robustness and optimization accuracy. Additionally, it incorporates two new adaptive factors to improve local search capabilities and introduces enhanced chaos operators to refine the initial solution. The improved Gaussian operator and lens reflection mechanism extend the search space, thus enhancing global search performance. Experimental results show that the network coverage of the STWSN optimized by ACGLSOA reaches 98.91%, and the node utilization efficiency is 73.8%. Compared with the optimization results of the Snake Optimizer (SO), Artificial Bee Colony Algorithm (ABC), RIME Optimization Algorithm (RIME), and Particle Swarm Optimization Algorithm (PSO), the coverage of STWSN is improved by 9.74%, 8.24%, 14.45%, and 29.68%, respectively. Furthermore, the node utilization efficiency is improved by 7.27%, 6.15%, 10.78%, and 22.13%, respectively. Therefore, optimizing the node deployment of STWSNs through ACGLSOA enables the network to provide better coverage to the target area more cost-effectively.