There are a few of them that are cannon at any given time.
Last one I read, in the distant distant distant future they control the whole of the universe. Then the end of time starts to destroy the universe and they use their technological abilities to send a whole bunch of Mind Flayer back to the beginning of time, then those groups will eventually take over the universe again in some kind of weird predestination parodox.
My personal favorite interpretation make them creations of Thun, who for all intents and purposes is a Dark Lovecraftian God that normally people cannot possibly understand without going mad. The Mind Flayers are like his hearlds. Ia Ia Cthulhu Ftghan.