How to collect sleep health data of Apple phones?

1. Take my own iPhone7 as an example:

Open the phone, find the "clock" app icon, as shown in the red circle below, and click to enter.

After entering, the interface shown below will pop up, which contains my own records of sleeping time last night and getting up this morning, and the red circle at the bottom says "Sleep Analysis" (because it takes one day, there is not much data).

At the same time, you can set it in the "Options" in the upper left corner, such as early alarm time, wake-up bell and so on.