Situated cognition is a theory in cognitive science that explains this phenomenon: Situated cognition states that much of cognition, especially the 'higher' forms of cognition, including reasoning, decision-making, planning, and problem-solving, happens not solely inside your head, but comes about through interactions with your environment, particularly when this environment includes a symbolic language, whether this be natural language (like English), or a specialised language (math, diagrams, etc).
So, whereas we often think that our symbolic expressions are merely expressing our already completed thoughts about something, situated cognition says that these expressions are much more than that: they actually enable you to think, or at least think further, than you could without that language. Language is a powerful tool to help us think, and help us solve problems.
Indeed, imagine how much math you would be able to accomplish without the language of math ... not much at all! And think about this: why is it that when faced with a tough problem, you often find yourself talking to yourself? If all the thinking is happening inside our heads, what use is it to express those thoughts to yourself? But situated cognition says: expressing these ideas to yourself is useful, as you are engaging yourself in a dialogue, and dialogues are yet another way to interact with your environment; even if you have a dialogue with yourself, it is the act of hearing those expressions that will cue certain responses, and thus further the reasoning process.
So yes, the act of carefully formulating and describing the problem is part and parcel of the very act of problem-solving, so what happened to you is not at all surprising, and is in fact very common, and has a perfectly good cognitive explanation.