How does the sleep function work? I

Do I need to wear my watch all the time? Will it sense when I'm sleeping?