I would say that you just didnt have the time to think about when you woke up. Thats happened before, and there have also been time when I did the same but it was only worse. Also the rush of adrenaline you got from your state of panic may have helped as well.