I thought it was The Tommyknockers by Stephen King, but after a check with Wikipedia, it appears that's not the case.
What I remember about the story (a TV movie I think, but definitely based on a book) was that the world is created anew every night, and that the old, used up, Earth was eaten nightly by some scary creatures.
The major plot point involved some protagonists not getting onto the new world at midnight, and having to escape from the monsters that were eating up yesterday's planet.
Does this ring a bell for anyone? I'm finding it very hard to Google for.