From a more Vedantic perspective, but I'm open to Buddhist reflections:
When you wake up, the seeds of problems that are embedded in sleep sprout up in full fruition the moment you cross the threshold of waking. You immediately shift from the consciousness of absence to the consciousness of problems: what are my obligations today? What will happen in three hours? Did I oversleep? Did I forget something? The fact you were conscious of absence meant also that you were self-situated and therefore at peace. This is because there was nothing besides you to distract away from you. You are conscious of absence in the waking state as well, though not as pronouncedly; you know you are above anxiety at least. You still engage with objects, but you are settled in your subjectivity. You are primed; you are ready.
The trauma of waking up is therefore simply due to an ill, abrupt transition where there is no self-situated rationality to weather all things.
So one's duty first thing when one crosses the threshold of waking, is to be aware of oneself and immediately shut down all worry. Do not let the weeds of thoughts sprout up instantaneously (or at least, any more than they already have). Remember that the Self cannot be grieved. Only apparently. One moves on right the next moment. Be attentive of That. Do not lose sight of yourself at the Threshold of Sleep/Waking. Know the Fourth, which is the One. Be the Turiyam. Associate and Finally Identify with It.
Remember that sleep is not the absence of consciousness but the consciousness of absence.... So be conscious of absence during waking, and you won't miss it in sleep....