calculate sleep from 1 day data