Since 0.8.0:
// SYNTAX int reason = System.wakeUpReason();
See SleepResult documentation.
SleepResult