People often seem to generate creative ideas during moderately engaging activities, such as showering or walking. One explanation of this shower effect is that creative idea generation requires a balance between focused, linear thinking (which limits originality) and unbounded, random associations (which are rarely useful). Activities like walking may help us strike this balance by allowing mind wandering in an engaging environment that places some constraints on thought. Although past studies have found an inconsistent relationship between mind wandering and creative idea generation, they have two limitations. First, creativity researchers have not studied a key form of mind wandering, which is freely moving thought. Second, studies have used boring tasks that may encourage unconstrained and unproductive mind wandering. To overcome these limitations, we investigate the relationship between idea generation and freely moving mind wandering during boring versus engaging video tasks. Across two studies, we find that mind wandering leads to more creative ideas, but only during moderately engaging activities. Boring activities lead to either more ideas or more semantically distant ideas overall, but these effects were unrelated to mind wandering. Boring activities may therefore lead to ideas by affording time for focused problem solving, whereas engaging activities may do so by encouraging productive mind wandering.