When I'm in class I like to always have my sketchbook handy. Occasionally I jot down something pertinent but mostly I'm just doodling to prevent my brain from falling asleep.
Sometimes people ask me where my ideas come from, or why so many of them involve hotdogs. I don't always know the answer but I do know that it helps me to be drawing pretty much constantly. Like a lot of humans, the most awesome stuff I make usually starts out as an accident. I get more of those lucky strikes when I'm doodling aimlessly in school or on my commute, anytime my brain can slow down.