I assume it is based on how long you are awake, although I suppose it could look at steps too. If it is too long (I don't know what that time would be), it will break it into separate sleep segments. If that happens, sometimes you can edit your sleep log to treat it all as one sleep.
Best Answer