I started to have that before I was diagnosed with Narcolepsy. My hallucinations were always of ghosts or spiders. I'd let your doctor know. I mean it could very well be a spider in your home, hut if you only see it at night right when you wake up it could be something else.
First and foremost you're not crazy. So you got that going for you! Is the spider abnormally large? That's a big indicator. Another thing to out your mind at ease is to look up if it's even possible to have that type of spider in your area.
Either way I would mention it to the doctor. Do you have any other symptoms that may indicate a sleep disorder? Like excessive daytime sleepiness? Falling asleep at inappropriate times, loss of muscle control?
Sounds like hypnagogic hallucinations, see link bellow. Hope it helps! :)
http://www.wisegeek.com/what-are-hypnagogic-hallucinations.htm?vm=r
Hi, welcome to the forum, you are going through visual hallucinations which seen due to neuroophthalmologic dysfunction resulting from a wide variety of underlying etiologies. This condition can overlap with visual illusions which include distortions of size (micropsia or macropsia), shape (metamorphopsia), and color (dyschromatopsia).
The type of hallucinations you are experiencing is known as Complex or formed hallucinations as you see things with details like animals, people etc (spider in your case). In such cases it is very important to note any other conditions like eye problems, stress, confusion, memory loss, alcohol, drug, and medication history is also important.
Conditions which can present with such symptoms are Migraine (aura manifests as visual hallucination), Seizures, Alcohol and drug use, psychiatric illness and metabolic encephalopathy.
You need to undergo polysomnyography (PSG) to rule out sleep disorder, EEG to rule out any epileptic foci, and also psychiatric evaluation which will help to rule out any factor.
I suggest you to sleep with lights on, good sleep hygiene, long acting sedatives against prescription will help you maintain sleep, keep away from any triggering factor (smell, food etc. need to be identified.), share your inner feelings with family and friends, hot and cold water bath will help you to alleviate condition.
I suggest you to consult neurophysician/psychiatrist for further evaluation. Take care and regards.