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
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.