The Maharsha states:
ואמר ונענע לי ראשו כי זה גם תפלתו ית' ב"ה כדלעיל
[R"Y] stated that God nodded his head. [Maharsha continues] For this was also God's prayer as [indicated] above ...
This leads me to believe that per the Maharsha, the reason that God nodded after R"Y's blessing was to acknowledge that R"Y's blessing aligned with God's prayer. Sounds like God's prayer preceded the blessing.
What is fascinating about this Maharsha is that prima facie the Gemara is using the fact that God nodded His head as 1) proof that the blessing of an ordinary person should never be unimportant in your eyes, but 2) NOT as proof that God enjoyed this particular blessing because it happened to match His original prayer too:
Berachot 7a
וְנִעְנַע לִי בְּרֹאשׁוֹ. וְקָמַשְׁמַע לַן, שֶׁלֹּא תְּהֵא בִּרְכַּת הֶדְיוֹט קַלָּה בְּעֵינֶיךָ.
[The Holy One, Blessed be He] nodded His head [and accepted the blessing]. This [event] teaches us that you should not take the blessing of an ordinary person lightly.
Let me put this another way - if God nodded His head only because He was familiar with/the author of this particular blessing/prayer then the Gemara would not extrapolate this episode as general proof that everyone should not take the blessing of an ordinary person lightly.
I suppose that the Maharsha sees both aspects in the nod.