I used to have times when I would "wake up" and usually think I was either somewhere I wasn't meant to be and be trying to get out of a place I wasn't in, or that I'd not done something, a few times (that I know of) I did actually go to sort it, thankfully within the house, I remember my Dad finding me once and asking what I was doing randomly standing in the kitchen in the middle of the night. After a while I would realise/properly wake up though. I used to have some very nasty vivid dreams too, some which were more "real" I would have to remind myself certain things hadn't actually happened when I woke up.
This was before I was on medication though, considering how much I'm on now. I think maybe stress related. I also had bad bouts of insomnia and didn't have much of a routine etc...
I'm very strict about bed routine now, give myself time to relax when my body knows it's getting to bed time, keep similar hours, have no TV/eating in bedroom, I don't read in bed, I have a routine of locking things up, taking meds...in the same order, once I'm properly awake in the morning I get up and out of bed, even if just to go lie on the sofa. Febreze do a nice sleep scented spray which I find quite relaxing.
However, I'm also on medication which helps me sleep (with pain and such) and I am not such a light sleeper now which helps and I really need my sleep and get very tired so lots changed as well as my routines.
I find getting too hot can make give me horrible dreams and wake me up so try to plan for that.