It's a healthy habit to schedule your writing each day and goes a long way towards keeping you on track. However, life does not revolve around a writer's work, but the other way around. You sometimes have to put in extra hours in your day job. You might have a relative sick or in the hospital, or you yourself might wake up ill. When this happens, I have the nasty tendency to go ahead and try to get all of my work done regardless of what surprises have come my way on a given day; there are times when I go to sleep at two or three in the morning. Now, the next day (or later that morning, depending on how you look at it), I have to wake up early to start on the same amount of work.
I have to sleep eight hours, almost exactly. If I go to sleep at 2:37 AM, I'll wake up at 10:37 AM give or take a few minutes. So, ideally, I'll have to be asleep by midnight in order to wake up early enough to start the next day's work. I know that the solution to the problem is simple, and I'm not going to try and blow it up into something epic when it isn't.
The point that I'm trying to make is that you have to strike a balance between progress and function. If I end up sleeping the necessary eight hours, I'll be awake enough the next day for work, but I'll have less time to get it done, which means that I'll be up late again in order to catch up. On the other hand, if I sleep for three or four hours, I might wake up early enough to get my writing done, but it won't do me any good because I'll be too tired to get any writing done, or not done very well.
I remember in college I tried to maintain a load of writing while preparing for semester finals. I managed to get through my finals, but my writing time was usually from midnight until four or five in the morning; a couple times, I'd be awake for a few days without sleep. When I went back and took a look at the writing I produced, it was useless, utter gibberish, and had to be rewritten. Two weeks of writing were wasted. Don't let this happen to you. If you're having sleep issues, take a day off to rest up, maybe even two days. Don't write fiction. Don't write poetry. Don't even write a grocery list. Focus on resetting your clock and then get back to work.