It is pretty mysterious. Last month I downloaded my sleep data and began to look for a linear combination of factors (e.g., Duration + Sleep efficiency + HR + etc.) that predicted Restoration but didn't make much progress. Eyeballing it, I can see 2 days in the month, one that's "Good" and another that's "Moderate" and yet the stats themselves looks the same. That suggests (OHNO!) that there is also an "historical" factor, i.e, a moving window or average that includes the influence of recent days. If that's the case we'll never reverse engineer the formula, or even which measurements are being used.
On a related note, I now regularly get, "Your restoration was delayed in the beginning of your sleep. Try minimizing physical and mental stress close to your bedtime." Or...wait!...I just checked past days and the notification is gone...weird. But it's there for this morning. Seems I get it every morning and then it's gone the next day? If so that's an odd bug. Anyway, yeah...huge grain of salt!
OH! And here's another one I never noticed before: on my phone (Health app) the latest session is "Thu 6/4" and yet those same data are showing up as "Today, June 5, 2015" on the Dashboard. So Phone = "The day I go to sleep" and Dashboard = "The day I wake up." When did that start happening???
-Matt