We clearly think in ways that aren't available to the conscious parts of the mind, read most any Oliver Sachs or VS Ramachandran book for clear evidence of that. But what part this plays in specific problem solving isn't clear.

And this article dismisses unconscious thought but doesn't offer a good explanation for what is happening. For instance, what actually happens when you figure something out? And while what actually happens is undoubtedly related to flashes of inspiration or seeing an optical illusion in a new way, these things are only part of the story. A story that isn't told by most conventional models of learning or understanding.

But with careful observation, you can find clues for a simple explanation of epiphanies, solving problems in your sleep, and acquiring greater understanding over time. And that explanation is that the mind grows during rest/sleep in response to cognitive effort, most significantly during a period starting at least 24 hours afterwards and maybe peaking 36-48 hours later. That time frame here is from my own observations, the actual numbers aren't important to the explanation here. But it seems probable that learning and understanding is the result of “brain growth” that occurs as a result of thinking about something, and that this growth is specific to what you've been thinking about, and is cumulative. Your brain is not consciously thinking during this, and likely not unconsciously thinking about it either, but instead is just growing in a specific area. The result of the growth is that you are better able to perceive and grasp ideas that you couldn't previously.

We already know that memories are “consolidated” during sleep. Likely this consolidation is just some kind of structural or neural growth in the brain. Other parts of the brain are unlikely to be much different. The flashes of inspiration can be sudden understandings of a simple problem, but understanding deeper concepts or ideas requires brain growth in the area. I'd guess the flashes of inspiration type of understanding is analogous to short term memories, whereas deeper understanding and learning is the result of accumulated brain growth. When that brain growth becomes sufficient to grasp a concept, the sudden understanding (or epiphany) moment doesn't necessarily come with a realization that your brain is different and only has just then been able to grasp or figure out a problem.

Also, my intuition tells me that maybe we don't actually know anything at all, and we really only “figure out” everything. In other words, our brain is just a very good JIT (just-in-time) prediction engine. And when we think we know something, it's actually just the case that we predict or model it in real time at the moment we begin thinking. And memories are reformed every time we try to recall them, by neural structures that recreate the same pattern over and over when it's asked for.

This also explains things like prodigies, who typically spent many formative hours immersed in something over a long period to develop their abilities, and even acquired savant syndrome that can occur after head trauma (which does occur until after the brain has healed in response to the trauma).