iPhone alarms could automatically change to give users a full night's sleep

Apple has looked into how people can get a full night’s sleep, and has come up with a way that allows someone to be woken up after spending a desired amount of time asleep instead of just at a set time, by monitoring when they actually start sleeping.
Source: macinsider