I find it interesting that when we're asleep - supposedly unconscious - we're frequently fully conscious, mired in a nonsensical dreamworld of our own creation. There's currently no universally accepted theory for the purpose of dreams - they range from cleaning up mental detritus to subconscious problem solving to cognitive accidents. On the other hand, we DO know plenty about what goes on in the brain during the dream state.
Studies show that in dreams, our thought processes are largely the same as they ones we use when we're awake. The main difference seems to be that we don't notice the insane world that we're a part of. We reason perfectly normally based on our surroundings, we're just incapable of reasoning about those surroundings - we lack metacognition when we're dreaming. The culprit behind this is a brain area known as the dorsolateral prefrontal cortex (DLPFC). It's responsible for, among other things, executive function (directing other brain functions), as well as working memory and motor planning. This combined with the fact that it's the last brain area to develop (meaning it was the last brain area to evolve) suggests that it's key in creating conscious, directed thought. And during sleep, it's shut down, cutting off our ability to question the premises we're given. So, barring entering a lucid dream state, we lack the mental hardware to recognize we're in a hallucination when we dream - it seems perfectly normal.
While we're dreaming, a number of other neurological events are taking place. Long term memories are being accessed and replayed. Brain regions that are normally unconnected work in concert to unite disparate bits of information. Whatever the purpose of dreams is (if they indeed have a purpose at all), they appear to be a window to the strengthening of mental connections and creation of new ones that takes place while we're asleep. And this behavior is necessary to maintain high-level mental functioning. People do better on tests after getting REM sleep, and people who are REM sleep deprived show extremely impaired memory and learning abilities.
Something similar occurs when our mind is wandering - unrelated brain areas are working together to develop new mental pathways (which is why talking about the importance of daydreaming is currently all the rage). The same thing happens when consuming alcohol - daydreaming and mental connection formation increases, and frontal cortex activity (and metacognition) decreases.
The implication here is that the creation of new cognitive pathways is something that takes place in the absence of conscious, directed thought. It passes the plausibility test - we have a limited amount of cognitive resources, so focusing our thoughts leaves fewer mental resources left over for other tasks. And the formation of new mental connections is extremely important - it's essentially enlarging the search space our minds have access to when trying to solve a problem. Though it's not under conscious control, it's still a high-level function - young children and people with autism seem to have extremely muted dreams (if they dream at all), implying fewer mental connections are being formed. Our executive function is great at orchestrating different brain areas to find a solution to a problem, but it's only able to look through the space of possible solutions that's already been created.
Conscious, directed thought - amazing as it is - is not the end-all, be-all of mental function. Humans are at the top of the intellectual food chain (not to mention the actual food chain), but a number of the things that make us 'special' are things we share with other animals. Plenty of them can pass the mirror test. Plenty have language, use tools and have complex social structures. Physiologically, what sets us apart is our processing power - the sheer volume of cognitive pathways we can create and sort through. Half of solving a problem is having a search space that contains the answer, and the human mind can create an ENORMOUS search space. But it does so without directed thought.
If a problem seems intractable, then, you may not be able to make headway by THINKING about it harder. That infamous burst of insight seldom seems to come while hunched over a desk or after that 10th straight hour in the lab - it comes "in a moment of distraction or else burst forth from the subconscious while we sleep" . Though it's obviously important to put the hours in to understand your subject (the brain can only work with what it's given), a creative or insightful solution arises from those pseudo-random mental firings that are beyond our conscious control. The answer to a hard problem might be a mental path that your brain hasn't formed yet, making trying to think your way through to it a fruitless endeavor. At a certain point, it's important to step back, relax, and let your subconscious create more grist for the mill
 As an aside, the fact that the brain region responsible for working memory is shut down may be the reason why we generally don't remember our dreams, and why writing them down and trying to remember them is an important step in learning to enter a lucid dream state (when the DLPFC is thought to be activated).
 Mind-wandering actually seems to be MOST effective when we're at least partially aware we're doing it - if you're not paying any attention at all, something important could easily slip right past you. Something similar probably takes place during the lucid dream state, where we're aware enough to direct the flow of the dream but not so aware that we wake ourselves from it (a frequent problem of beginning lucid dreamers).
 Though I suspect there is a selection bias at work here.