"He disliked bars and bodegas. A clean, well-lighted cafe was a very different thing. Now, without thinking further, he would go home to his room. He would lie in the bed and finally, with daylight, he would go to sleep. After all, he said to himself, it's probably only insomnia. Many must have it." (Hemingway)
You should know before you go to bed what and when you will write the next day. If, for whatever reason, you cannot decide what to write, or do not know when you might find time to do so, you should plan not to write. Just make a conscious decision before going to sleep not to do any writing tomorrow. Then, if you get an "inspiration" or some other urge to write during that day, simply note the idea down in your notebook. Don't write it out in prose, but set aside time the next day to write. Now, at least, you know what you want to say.
You may, however, have a standing plan to write at a particular time every day. I, for example, normally write a post for this blog every morning between 6:30 and 7:00. The night before, I settle on one of the many ideas I have in my head about scholarly writing. So what happens if I can't think of anything to write about, or I can't decide on any one of the many things I may be thinking about? (Blogging is actually a poor model here because the fact that what I write will be published immediately requires that I will have to want to say whatever it is I end up writing about.) Well, I can decide not to write a post that day.
This past Friday was the day after Thanksgiving, for example. We had been invited to celebrate with some American friends and I knew that I would get to bed late, stuffed with plenty of wine and food. So I knew there would be no writing early the next morning. It was a simple decision. Last night was different. I simply couldn't sleep. So I wrote this post instead as a kind of decision not to write a post tomorrow. I then scheduled it to post at 7:00AM, as usual. But I can't lie to my readers. This post is clearly a violation of my discipline.
Again, blogging is not a very good model. I would never recommend spending a sleepless night working on an scholarly article. (Especially if that work coincides with canceling tomorrow's planned work on the same article.) But since I have already cancelled tomorrow's post, and I have nothing better to do, I thought I might as well share my decision process with you. Sometimes you can't sleep. And it's only a blog post, after all.