Details have surfaced about one of the potentially key features of the next Apple Watch — sleep tracking. Bloomberg originally reported that Apple has been working on a sleep-tracking feature, and 9to5mac now details how the implementation could work.

The new feature would work on the next Apple Watch. The new device could be unveiled at Apple’s iPhone event next week or at a later event this fall. It’s unclear whether existing devices will also support the new feature.

You don’t need any extra hardware to enable sleep tracking — an Apple Watch strapped on your wrist is enough. When enabled, the Apple Watch will track your movements using the accelerometer. Apple also plans to take advantage of the heart-rate sensor. Interestingly, the company could also leverage the microphone to listen for noises.

When you wake up, you can check the quality of your night in the Health app on your iPhone. According to 9to5mac, there will be a new Sleep app on the Apple Watch as well.

As most people use their phone as an alarm clock, Apple would mirror your alarm on your Apple Watch. This way, the alarm would play on the Apple Watch first and use the iPhone as a backup. You could limit the alarm on the Apple Watch to vibration only. This feature would be particularly handy for couples who don’t have the same schedule.

When it comes to battery life, Apple could send you a notification to remind you to charge your Apple Watch before going to bed. Remember that the Apple Watch has a tiny battery, so it charges in no time. You could easily get enough battery life in just a few minutes.

That feature would work particularly well with the next iPhone. Rumor has it that Apple will add reverse wireless charging to the new iPhone. It means that you would be able to put your Apple Watch on the back of your iPhone to charge it directly from your iPhone.

And if you’ve been a longtime Apple Watch user, Apple could also let you pick a second Apple Watch and turn it into a dedicated sleep tracker. You’d just have to switch from one Apple Watch to another when you go to bed.