Apple really ramped up its health efforts a few iOS versions ago and one of the sleeper hits (pun intended) is the bedtime feature.
Buried in the clock app on iOS is a tab called bedtime. In here you can set your wake up time (this also sets an alarm) and how long you want to sleep. Once you do this, you get a bedtime reminder every night and sleep data populated into your Health app. If you set the option your phone will also turn on Do Not Disturb mode during your sleep.
Read more