There's at least two reasons that I think this happens during the writing process. The first one is that maybe,you're right. Maybe it does stink. Maybe it's boring. There have been times when I've been working on a novel that I have started to get bored with it. When this happens, I have to reexamine my writing, because sometimes I'm bored with it because my writing has turned stale or boring. When that happens, I have to figure out what I've done to make it boring and inject new life into it. Maybe I'm not creating enough tension. Maybe I've portrayed my characters as one-dimensional. Perhaps, I'm failing to make the setting come alive. So, if you ever start losing interest in your writing, first take a hard look at ways you can improve it to make it more interesting.
However, sometimes we get sick of what we're working on simply because we've been working on it for so long that it has become too familiar to us. It's like listening to your favorite song over and over and over again. You love it maybe the first few hundred times, but after awhile you grow sick of it and you hate it. It's not that the song has magically gone bad, but it no longer holds any appeal to you. If this happens in your writing, you have to fight through it and keep writing until you finish it, even if you think every word you write is junk. Maybe it is junk, but that's what rewrites are for. But once you have it finished, you can breathe a sigh of relief, let it sit in your drawer for a while, and then take a fresh look at it to do your rewrites. Chances are that when you do, you'll realize that it isn't nearly bad as you thought it was and that it fact it's pretty good, or at least it will be once you get your rewriting done.
So, once again, what do you do when you're sick of what you're writing?