Wrist-worn accelerometers are increasingly being used for the assessment of physical activity in population studies, but little is known about their value for sleep assessment. We developed a novel method of assessing sleep duration using data from 4,094 Whitehall II Study (United Kingdom, 2012-2013) participants aged 60-83 who wore the accelerometer for 9 consecutive days, filled in a sleep log and reported sleep duration via questionnaire. Our sleep detection algorithm defined (nocturnal) sleep as a period of sustained inactivity, itself detected as the absence of change in arm angle greater than 5 degrees for 5 minutes or more, during a period recorded as sleep by the participant in their sleep log. The resulting estimate of sleep duration had a moderate (but similar to previous findings) agreement with questionnaire based measures for time in bed, defined as the difference between sleep onset and waking time (kappa = 0.32, 95%CI:0.29,0.34) and total sleep duration (kappa = 0.39, 0.36,0.42). This estimate was lower for time in bed for women, depressed participants, those reporting more insomnia symptoms, and on weekend days. No such group differences were found for total sleep duration. Our algorithm was validated against data from a polysomnography study on 28 persons which found a longer time window and lower angle threshold to have better sensitivity to wakefulness, while the reverse was true for sensitivity to sleep. The novelty of our method is the use of a generic algorithm that will allow comparison between studies rather than a "count" based, device specific method.