Sounds like you were sleepwalking. Either that, or your dreaming part of hte brain stayed on long after you woke up and gave you strange hallucinations like the impulse to move your pillow. It's not abnormal, lots of times the brain keep dreaming after you wake up, although it's usually only for a second or two. I've had that last for a minute before though.