Not sure of source, and not enough time to look through mountain of dnd books, but mind flayers escaping extinction in the future by returning to the past has been around a while.
I "think" its also a bit of lore that they created the gith in the past that end up rebelling in the future...