Honestly this just sounds like a random anxiety attack. Do you get anxiety attacks often? Were you in a new place that you're not comfortable with? Was something really bothering you or stressing you out? If you answered yes to any of these questions there is your answer. It was just an anxiety attack, if this starts to happen often talk to your doctor he can definitely prescribe you with something to help. If you don't want to take medicine, look for self cures like deep breathing before bed, clearing out your mind or maybe even meditating. There are lots of things you can do to cure anxiety attacks with or without medication.