The neighbor's dog is barking.
Your stomach growling.
Or your significant other snoring.
There's that awful dentist appointment the next day.
You just realized you missed a deadline at work.
Or your mother-in-law will be on your doorstep in roughly five hours to stay for a month.
There are literally a million reasons why we don't get our well deserved shut-eye. Some are easier to escape than others. And some are more pleasant than others ... now get your mind out of the gutter. I'm not talking about that. On second thought, maybe I am. Because sometimes when I'm plotting, and my ideas are playing like a movie inside my mind, things can, depending on the scene I'm currently giving some extensive sleep-robbing thought to, get steamy too. Mostly I ponder dialogues though. Really!
Maybe it's the writer in me (what else could it be) that when I lay me down to sleep, I delve into the realms of my stories and get involved in some preliminary considerations concerning the plot, or certain scenes that keep on bothering me with a detail (or two) that I didn't manage to deal with appropriately during the day. Appropriately basically means starring into the air and ignoring the rest of the world. This usually leads to the rest of the world wondering whether they should check my pulse. When I am in bed no one will do that. Unless I lay there for over twelve hours. Then someone might hold a small mirror underneath my nose. But I digress.
It's funny how ideas will jump at me from all kinds of places during the day. Of course I also get some significant work done writing those ideas down while the sun's still up. It's not as though my brain wouldn't be capable to plot during the daytime. Sometimes though things fall in place so much easier, almost naturally, when I am cuddled up in bed letting my mind wander. You could say I am always writing though sometimes only in my mind. I once heard that an author will spend 10% of their time actually writing and the other 90% plotting. Who ever said that, must spend about as much time awake at night as I seem to do.
You might wonder if it never bothers me how my writer's mind won't let me sleep. I admit, sometimes it does, but then I just switch over to one of my favorite (already written) scenes and slowly drift off to sleep. And when I'm really lucky, my stories will even follow me into the realms of my dreams.