Sleep paralysis is what keeps you from actually 'doing' the actions that you dream. Like if you were dreaming of running, its what actually keeps you from really running around while sleeping. When you kinda half wake up, but don't really... just enough to be partially dreaming, but partially awake (its a strange state) Sleep paralysis is still in effect. So you are basically stuck until you are fully awake when your brain catches up.
Its during this state that people experiance 'ghosts' and stuff when they wake up, It then that a lot of people claim to go 'Out of Body' or also claim about 'Alien Abductions'.. its all just sleep paralysis into a lucid dream. The shadows you saw are super common, they werent real. Your legs sliding was just you're brain playing tricks.
I dunno about ghosts being real. I've made my mind up that they could be real. But you should'nt worry about them. They couldn't hurt anyone. They would be pure energy and not able to interact with people.
-Andy
NewSchoolSkiing+dot+com
'I'm the best from the east, I'm a wild crazy beast' - Andrew 'Dice' Clay