Just the other day I was editing Tv Tropes, not even thinking about writing, and suddenly....STRIKE! I felt this desire and and wrote for hours. I felt charged and alert; almost precognitive about what to write. I went to bed happy that night. Those times are unexpected and some of the most fun. Its like in Ancient Greece when philosophers wrote of being 'divinely inspired'. At times it feels like I'm being pulled along.
Bad moods usually lead to a 'locked status' as far as actually writing goes but they're still useful. I think 'silver lining' and suddenly the rough outline of a plot or story arc starts forming in my mind. My favorite instance of this is when my computer was sick (slow, Blue screen of death, etc). I thought about how this could work for a book and I got the same jolt of inspiration. I grabbed pen and paper and wrote as fast (and legibly) as I could. I filled both sides and and reached for a second sheet. Later I used that rough outline to for a story arc. I wrote the first two or three scenes and first draft looked great. That rarely happens.
Of course I aim for the good moods. I outlined how this usually happens in my other post "In the Zone". Its like stoking a fire until a blaze starts but you have to be ready to catch that spark. That's why my laptop is always on and always with me.
The Lightening Strikes here: http://tinyurl.com/c9drhbt