Disrupted sleep patterns are a significant problem in the elderly, leading to increased cognitive dysfunction and risk of nursing home placement. A cost-effective and unobtrusive way to remotely monitor changing sleep patterns over time would enable improved management of this important health problem. We have developed an algorithm to derive sleep parameters such as bed time, rise time, sleep latency, and nap time from passive infrared sensors distributed around the home. We evaluated this algorithm using 404 days of data collected in the homes of 8 elderly community-dwelling elders. Data from this algorithm were highly correlated to ground truth measures (bed mats) and were surprisingly robust to variability in sensor layout and sleep habits.