Occasionally I'll go through periods where I'll get anxious and on edge. I usually go a couple of days or so thinking this is just a regular mood swing, but then I realize that there's something bothering me; something on my mind.

It's almost as if my subconscious notices/realizes something and begins working on figuring it out or solving it, and I'm stuck with it on the tip of my tongue until my subconscious solves the problem, and then my conscious mind realizes what my subconscious has been working on. Usually I can look back and see all the clues and data that my subconscious was picking up on to work with (sort of like a "hindsight is 20/20" thing).

I've come to some pretty interesting revelations this way before. This process is how I figured out my (now ex-)wife was cheating on me.



What functions would be responsible for this sort of thing? and ?