If you were in bed (almost asleep) and opened you eyes and saw 'ghosts' it might have been sleep paralysis. It's just your mind, anyway.
Not to sound stupid or paranoiac or gullible, but you should be aware that shadows of people are called the Shadow People, they are spirits whit shadows that A LOT of people see on their walls. You should be aware that you aren't the only one seeing those shadows, which might mean something...