Sleep detection

 Hello, can someone explain to me the reason why it recognizes sleep 2 hours later? It's always according to the diagram.