It doesn't matter what time of day you work, but you have to work every day because creation, like life, is always slipping away from you. You must write every day, but there's no time limit on how long you have to write.
One day you might read over what you've done and think about it. You pick up the pencil or turn on the computer, but no new words come. That's fine. Sometimes you can't go further. Correct a misspelling, reread a perplexing paragraph, and then let it go. You have re-entered the dream of the work, and that's enough to keep the story alive for another 24 hours.
The next day you might write for hours; there's no way to tell. The goal is not a number of words or hours spent writing. All you need to do is to keep your heart and mind open to the work.