This song was written during the recording of a remake of "Why Does The Sun Shine?" for Here Comes Science. According to John Flansburgh, each song had to be fact-checked for the album (a first in the band's career), due to the impressionable nature of the target audience—children. The original "Why Does the Sun Shine?" was recorded in the 1950s and based on encyclopedic facts from the time, which were later discovered to be incorrect; rather than being made of gas, the sun exists mostly in the fourth state of matter—plasma. By the time the album's fact-checker, Eric Siegel, pointed this out to the band, they had already recorded the song and the accompanying video was already in the works. Not wanting to drop the fan-favorite song from the album but also not wanting to perpetuate incorrect information, the band was faced with a conundrum. While discussing the problem in the studio one day, one of the recording engineers, Jon Altschuler, suggested the band write an "answer song" called "The Sun Is A Miasma Of Incandescent Plasma," which is exactly what they did.
Also of relevance is the (TMBG-original) song "The Sun Is On Fire," which is also directly refuted in the line "The sun is a quagmire / It's not made of fire." It should be noted, however, that there was probably no intentional reference to this abandoned demo from 2001.