This is a timely subject- just today, I took my MIL to the doc's because for some time now she has been doing the same thing. Usually it's when she first wakes up- she sees spiders or geometric shapes and they are real enough that she takes a swipe at them, or jumps out of bed. I did some research on her meds, and it turns out that two of them, Prozac and impromamine (sp?) have been known to cause hallucinations. Her doc has recommended she quit the Prozac, as she needs the other med more. (For IBS).
Of course, your house could also be haunted.
