> I often have the experience of banging away at some problem for a few hours, then going away and not thinking about it for a while then a simple resolution pops into my mind without much effort.
This phenomenon is explained by focused vs. diffused modes of thinking, which I first heard about in Learning How to Learn MOOC [0]. There are many popular articles on the Web explaining the concept.
[0] https://www.coursera.org/learn/learning-how-to-learn