An Apple Patent published this week describes the use of Machine Learning within a new Sleep Stage Tracking System  Patently Apple