Many applications and protocols in IoT Environments are based on spa-tial query processing. Spatial queries are often submitted by users toextract and derive information from sensor nodes and get the resultof the query on a particular area in a monitored region using locationinformation. In this paper, we are particularly interested in Windowqueries, because it is one of the most important types of spatial queries,and retrieve the physical data detected from nodes in a two-dimensionalzone of interest. The current research fits within the framework ofstudying the problem of spatial query processing in the context ofIoT Environments. Our objective is to propose a Window query pro-cessing approach for IoTs based on different performance trade-offs,namely energy efficiency, latency, and accuracy. In this regard, a newapproach, based on the paradigm of mobile agents, for spatial queryprocessing in IoT Environments is proposed, which responds to the con-straints of sensor networks to enhance the efficiency of spatial queryprocessing in a geographic area. Finally, the simulation results obtainedfrom the NS-2 simulator showed the effectiveness of our approachfor several simulation parameters and in different environments.