When one half-awakens from sleep and lulls in that place between conciousness and reason, all of the functions of memory are present but the ego cushion which the mind builds to keep one from excess anxiety is not present yet, and therefore, one's tribulations seem much greater. This isn't waking up in a cold sweat; a more accurate description would be waking up and then sweating, coldly. This can often become the thin end of the wedge, releasing a flood gate of worry and woe, causing one to remain awake for many hours, later into the morning. Of course, after several hours of familiar conciousness, one can come to terms, realize that things aren't so bad and possibly even return to bed.