Technically this is something that we could maybe get from the garmin connect api, but what you are actually getting is questionable. Their sleep api is suboptimal.
It seems that the only records they mark as sleep and return in the api are when you put it into sleep mode, but then they just mark everything as sleep.
They auto-detect sleep in their own app, but this seems to be based heavily on the bedtime/wake time that you set in Connect, and also doesn't seem to propagate to the api. So in my experience it tends to be any time I sit still for longer than 5 minutes after my "bedtime", that it starts to mark things as sleep -- and I'm often sedentary in the evening, long before I get to bed. But anyway, the autodetected sleep time doesn't seem to be available via the api.
Finally, the suppress all activity-level data for records marked as sleep -- or perhaps they just don't really have the granularity from their hardware to do a very precise job? Anyway, my experience with the connect api says it's not so great for sleep tracking.