Why do i get paranoid when i'm tired?

Whenever i get really tired late at night (usually somewhere around 1-2 am) i get really paranoid about things, its something different every time with no pattern, one time i sincerely thought that slenderman was in my closet, other times i worry about monsters from minecraft, usually creepers and zombies in my room and around corners, a common one is spiders (not minecraft spiders, actual spiders) being that i'm highly arachnophobic, i don't know why but paranoia always hits when i'm really tired, a lot of the time (like right now) i get so scared of irrational things that i can't even get to sleep, can someone please help me with my paranoia &/or explain it? Is there a way to cope or get over it? Any and all advice is welcome and appreciated, thanks!

It happens.