Compressive sensing (CS) has been widely used in the Internet of Things (IoT) to achieve efficient information collection. However, existing works have mainly focused on utilizing CS to lower the sampling rate or reduce the number of transmissions, without explicitly accounting for the heterogeneity of energy consumption in IoT environments. In this paper, we propose a CS-based prejudiced random sensing strategy (PRSS) that explicitly considers the heterogeneous energy consumption of IoT sensor nodes at different locations, in order to accurately attain a desired tradeoff between the overall energy consumption and the sensing accuracy. Specifically, each sensor node participates in sensing via distributed random access based on an assigned sensing probability, which is determined by its energy consumption in sending the sensed data, data collision rate and its contribution to recovery accuracy. We employ the statistical restricted isometry property as a practical indicator of the recovery accuracy and derive a sufficiently good recovery error bound based on it. Accordingly, we devise a novel convex optimization framework to find the most energy-efficient sensing probability assignment strategy with accuracy guarantee. We evaluate the PRSS using real-world sea surface temperature data traces. Comparative simulations corroborate that the PRSS can significantly reduce energy consumption and prolong network lifetime without sacrificing sensing accuracy.