i had this again a few nights ago lasted about three hours i eventually got up when downstairs exhausted and flopped in front of netflix with the dog who was not much impressed with me waking her up! sometimes you cant beat and have concede defeat with it. From what i understand it is type of panic attack/anxiety attack that occurs between falling asleep and being awake. Your brain or some region of it seeing sleep as a danger or threat and then waking you up before you succumb to it by sending out a jolt of adrenaline or cortisol which washes over you causing a sensation around your chest area and or a jolt in your muscles to bring you back to a fully awake state. it is most likely caused by underlying anxiety or worry over anything and everything that may be currently plaguing you in your life. you may even go to bed thinking that you are not anxious or worried and still suffer them! my uk doctor told me they are harmless are not related to a medical issue and are of themselves a type of mini anxiety/panic attack. he told me that he used to get them when trying to sleep on his nights off from duty as junior doctor. unfortunately they can lead to a bit if cycle that can last a while until it finally settles down again. i get them sporadically through the year. what i find helps is;
avoid caffeine after 2pm completely cut alcohol down cut down sugar drink enough water during the day ensure you get enough magnesium and iron i take a good mulitvitamin 3 times a week walk each day for half an hour or more knock facebook movies kindle video games etc all on the head a couple of hours before getting into bed address any lingering problems in your life as best you can dont get angry at yourself for not sleeping dont let it frustrate you tell yourself that the episodes cannot harm you and make peace with them when they occur just accept it
i truly believe it is anxiety/worry or panic related issue that becomes self perpetuating and but does break off eventually. There is alot of the usual stuff listed above but in following it it has helped me ten fold. the hardest bit is sticking to it and committing to it. small changes make a difference in time.