In my games, I had it that in times long past, the illithids plotted to put out the Sun. They spread psionic ability amongst all humanoids, and slowly siphoned off tiny portion of this, but a tiny portion from millions, is a
lot...as an accident of this, defiling was born as a pisonic/wizard experimented.
When the illithids had enough power, they tried ot put the Sun out, but it screwed up, the Sun swelled into a red giant, was going to go nova, the gods intervened to stop this, but the resulting catastrophic energy release basically "burned out" the Athasian Astral Plane/planes and thus the gods.
Meanwhile, the imbalances triggered by psionics and defiling had lead to catastrophic war, so as the gods died, So-uts (who are living weapons designed to destroy metals and thus weaken enemy armies/civlizations), armies of all types, mostly got wiped out as well...magic went wild from the near-nova...defilers had ruined much of the land etc.
From this chaos and catastrophy, emerged eventually the sorceror-kings and their cities
That I think makes a lot more bloody sense than
demi-god psionc halflings in a space ship from the novels...meh!