As I am an avid runner and I train daily, I pay close attention to all sleep, heart rate, stress, and running performance numbers.
Unfortunately, it will frequently say I had good night of sleep when I definitely feel groggy or the opposite.
As to misclassifying idle time before and after sleep, I recognise that simple lifestyle adjustment could fix it (just don't browse on your phone before sleep!) But that of course won't fix it if you try to lie still but can't fall asleep.