In data acquisition (DAQ)-based services of Internet of things (IoT), IoT devices sense data and transmit data to the application server through IoT gateway (GW). Due to the energy limitation of IoT devices, it is an important issue to increase energy efficiency of IoT devices. Meanwhile, when data from a huge number of IoT devices are individually transmitted, the data traffic volume can be significant. To resolve these issues, IoT devices and IoT GW can use sleep mode and data aggregation, respectively. However, when the IoT devices are in sleep mode for long time and/or data are aggregated in IoT GW for long time without any transmissions, the data can be inconsistent. In this paper, we propose a consistency-guaranteed and energy efficient sleep scheduling algorithm (CG-E2S2) with data aggregation. In CG-E2S2, the optimal sleep duration and the number of aggregated data are jointly determined by means of Markov decision process (MDP) with the consideration of energy efficiency of IoT devices, data traffic in networks, and data consistency. Evaluation results demonstrate that CG-E2S2 with the optimal policy outperforms the comparison schemes in terms of energy efficiency, data traffic volume, and data consistency.