Sleep / Wake up detection via smartwatch (Garmin, Apple w, Google etc...)

Wouldn’t it be possible to build an app that connects to eg. Garmin Connect and ask if the watch owner is asleep or awake? (using sleep cycle detection) I don’t know if the watch register that in the beginning of the sleep cycle or if it is only registered after you wake up? Maybe it could be triggered to check? In any case the wake up time could be useful to determine that someone just woke up, right?

Anyone who have more information about this? (preferable for Garmin)

It takes time to guess when you fell asleep or woke up, then it usually takes time for the watch to sync to the respective services, and then Homey must periodically check for that so I don’t think the information will be in time to act on that. Some other people on the forum have experience with Withings sleep mats though, so if you use search you will be able to find more info on that.