Sleep Analysis inBed sample not recorded on Apple Watch in iOS 18

In this link, Apple states we can know when a user is in bed vs sleeping and compare their quality of sleep by it. Only, in iOS 18, Apple no longer reports inBed time samples for the Apple Watch. I get why they stopped doing this for the phone, but why the watch? Bug?

My app was using the inBed times for this very purpose and now only works for Garmin and Oura who still report inBed times.

https://developer.apple.com/documentation/healthkit/hkcategoryvaluesleepanalysis

Answered by DTS Engineer in 818798022

We stopped recording the inBed samples on watchOS 11 and iOS 18 because the samples are not quite as accurate as what we’d like them to be. As of today, the system doesn’t provide a replacement for the API. If you see that an issue, I’d suggest that you file a feedback report with your concrete use case for the team to consider.

Folks whom are impacted by the change today might consider implementing their own solution, for example, providing UI for users to input their in-bed time, or using their own algorithms to figure it out.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

This is causing a problem for me as well. I was relying on "In Bed" samples to group sleep samples into different sessions; without the "In Bed" samples, there is no easy way to determine when one sleep session ends and another begins. It seems like a conscious decision by Apple but I hope it is a bug, or that they reconsider this change.

In the meantime, does anyone have a suggestion of another way to group sleep samples into separate sleep events?

We stopped recording the inBed samples on watchOS 11 and iOS 18 because the samples are not quite as accurate as what we’d like them to be. As of today, the system doesn’t provide a replacement for the API. If you see that an issue, I’d suggest that you file a feedback report with your concrete use case for the team to consider.

Folks whom are impacted by the change today might consider implementing their own solution, for example, providing UI for users to input their in-bed time, or using their own algorithms to figure it out.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Sleep Analysis inBed sample not recorded on Apple Watch in iOS 18
 
 
Q