The main dependent variables were sleep onset latency , wake after sleep onset , total sleep time , sleep efficiency , and sleep quality , derived from sleep diaries completed daily by patients throughout the course of treatment .