
Guang |

Unmentioned study right before bedtime every night since the last level.
A pen pal, magic mouth pal, or what have you.
The equivalent of listening to language teaching audio files while asleep for the last level.
Divine revelation, gift of tongues as a sign of favor.
(Just a few ideas from a polyglot who wishes it had been that easy)

Zeroaim |
I played a character that I wanted to know as many Languages as possible. Ever time I leveled up I got a new Language, But we never could explain this. What would be a reason my character would just learned a Language?
If you're playing a character specialized in stacking languages I'd say he/she's a linguistic genius, in the classical sense of the word, it's after all a PC. Picking up a new language should be something the character can just casually do, in the real world Daniel Tammet learned Icelandic (one of the hardest languages) in just a week.
The character learning it "instantly" could just be having experienced it before and now seeing/hearing it again was enough to understand it fluently.