I used to write in bed, starting when I woke up. I believe that creative work comes from our subconscious mind, so I try to keep the gap between sleep and writing as minimal as possible.