I have always assumed that the phenomenon reflects what stage of sleep was ongoing when the sleeper awoke, but I have no evidence for this. In some of the deeper stages of sleep awakening can cause people to be groggy, but it may not be valid to extrapolate this to other outcomes. It may be variable depending on whether the awakening was spontaneous or evoked.