This paper presents a new algorithm that utilizes compressed sensing (CS) for reconstruction of wireless sensor networks (WSNs) data with spatial and temporal correlation. The proposed method utilizes a time-varying sliding window mechanism that dynamically adjusts both the window size and the number of measurements. This flexibility allows the algorithm to exploit spatio-temporal correlations effectively, ensuring that data within the window remains sparse and thus more compressible. By dynamically varying the number of measurements, the algorithm equitably distributes the sampling rate across different time slots, adapting to changes in signal characteristics and minimizing transmission costs. Simulation results demonstrate that our proposed algorithm outperforms other CS reconstruction methods by achieving higher reconstruction precision while requiring fewer transmissions. This is achieved through a decentralized data-window framework that maximizes the use of prior signal information, leading to improved signal recovery performance in diverse WSN scenarios.