Rapid increase of elderly population in the world is motivating innovative technologies for healthcare services that are both high-quality and cost-effective. Wireless sensor networks (WSNs) based smart home for assisted living is one of the most prosperous solutions to this area, since it removes the requirement of deploying wired devices and is easy to be implemented in existing home environments. However, limited battery capacity of sensor nodes constraints the lifetime of WSNs and prevents this solution to be widely accepted by the industry. Therefore, this paper proposes a logical correlation-based sleep scheduling mechanism (LCSSM) to achieve energy-efficient WSNs in smart homes. LCSSM first automatically generates logical correlations between sensors by learning from living patterns of different home residents. It then activates/deactivates sensors according to their logical correlations to reduce energy consumption. Numerical evaluation results based on real datasets have validated that the proposed LCSSM not only reduces energy consumption of WSNs significantly, but also retains the quality of sensing successfully. Specifically speaking, sensors with LCSSM successfully sense more than 94% valuable events occurred in the smart home with only 23%-57% active time of the whole evaluation period.