In my experience, the top more detailed view is available when I’m wearing Apple Watch to sleep. The bottom view is just based on other devices (e.g. when I stop using my iPhone and put it down to charge, combined with my sleep schedule data)
Yeah it seems like some days it just doesn’t have Apple Watch data, which I cannot figure out. Those views in the image are two different days by the way. I collaged two images together.