Sorry that's happening, it's certainly no fun.
Since my concussion I wake up in the middle of the night with a feeling of terror,
it happens right before I fall asleep too, also I can be sitting at night, not particularly tired, and I fall asleep immediately but it feels like I've passed out, then wake up 10 mins later, very weird.
My Dr said she thought I had PTSD and anxiety.
Feel better soon