The rapid development of the agricultural Internet of Things (IoT) is inseparable from the support of wireless sensor networks (WSNs) in recent years. To further facilitate the adaptation of WSNs to agricultural applications, reducing the energy consumption of sensor nodes in agricultural environments has become a crucial problem. Sleep scheduling in randomly deployed WSNs is an effective method to reduce the energy consumption of sensor nodes, which can extend the network lifetime while ensuring network coverage. However, most of the existing sleep scheduling algorithms require frequent information exchange (such as broadcasting to find neighboring nodes and collecting nodes’ residual energy), which will inevitably lead to massive energy consumption. To address this problem, in this article, an unmanned aerial vehicle (UAV)-assisted sleep scheduling algorithm (UAVSS) is proposed, which avoids excessive information exchange among nodes and ensures sufficient network coverage with the least number of sensor nodes. The UAV traverses all the sensor nodes along the shortest path to help information exchange and gather sensing data. Furthermore, the UAV path is planned by using the latest monarch butterfly optimization (MBO) algorithm. Simulation results indicate that the proposed UAVSS can prolong the network lifetime while ensuring the required area coverage.