When are inBed logs from the Apple Watch added and what do they mean?

Hello,

I am quite confused regarding "inBed" samples logged by iPhone and Apple Watch. I understand that inBed logs coming from the iPhone means the device is not moving and the user is not using the device which with a sleep schedule set up, means the user is asleep and that's all that can be provided by the phone.

However, I do not understand when the Apple Watch logs inBed events. Are these events also added when a user is napping or when a user has been lying down for a long time without movement, or even sitting?

If a user sleeps with their Apple Watch at night with a sleep schedule set up, are CORE, REM and Deep enough to check for asleep status? Or is inBed also necessary?

A last question, my friend with an Apple Watch and iOS 16 has these "inBed" samples coming from Apple Watch on Health Kit. However, I do only have "inBed" samples from my iPhone logged on Health Kit. Why is that?

Thanks for your answer, Blue

Please confirm that that you and your friend are using the same version of watchOS and are both using the native Apple sleep tracking experience rather than a third party app.

"If a user sleeps with their Apple Watch at night with a sleep schedule set up, are CORE, REM and Deep enough to check for asleep status? Or is inBed also necessary?"

It depends on the needs of your app. If you're developing an app that is trying to calculate time asleep separate from time in bed you would not want to fetch the inBed samples from HealthKit and just check the asleep samples.

I have the same question.

I would like to detect sleep latency - the time it takes a user to fall asleep after going to bed.

My Garmin Watch records In Bed and Sleep samples in parallel, as described in the docs [1]. This can be used to estimate sleep latency = time asleep - time in bed.

But my Apple Watch w/ watchOS 11 is only recording sleep samples, and not any "in bed" samples. It's interesting to see from the OP that other Apple Watches are recording "in bed' samples.

The docs even say: "By comparing the start and end times of these samples, apps can calculate secondary statistics. For example: the amount of time it took for the user to fall asleep".

But they also note: "Samples recorded by Apple Watch only include awake samples that occur between two sleep samples. When reading sleep samples from HealthKit, there might not be any detailed samples that correspond to the beginning or ending of an in-bed sample." But that's not saying that there's no "in bed" samples from the Apple Watch, just that there's no "awake" outside of two sleep samples.

Is the lack of "in bed" samples from the (potential newer) Apple Watch intentional behavior, or a bug?

[1] https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis

When are inBed logs from the Apple Watch added and what do they mean?
 
 
Q