Is there to be a final war in heaven after the second coming and Satan is no longer bound?
The book of Revelation tells us of the great war in heaven fought in the premortal existence:
“And there was war in heaven: Michael and his angels fought against the dragon; and the dragon fought and his angels,
And prevailed not; neither was their place found any more in heaven.
And the great dragon was cast out, that old serpent, called the Devil, and Satan, which deceiveth the whole world: he was cast out into the earth, and his angels were cast out with him.” (Revelation 12:7-9).
Exiled from heaven, Satan continues to wage his war for the souls of men here on earth. And in his cause he has recruited here on earth “principalities, … powers, … rulers of the darkness of this world, [and] spiritual wickedness in high places.” (Ephesians 6:11). This spiritual warfare, this war of ideology, will continue to escalate until it becomes a literal, physical war of annihilation. This is the battle of Armageddon, fought in the valley by that name (see Bible Dictionary: Armageddon). In the midst of this awful siege, the Lord will appear and save His people. Following this (and a few other signs of the times), the Millennium will be ushered in and Satan bound 1000 years.
“And he laid hold on the dragon, that old serpent, which is the Devil, and Satan, and bound him a thousand years,
And cast him into the bottomless pit, and shut him up, and set a seal upon him, that he should deceive the nations no more, till the thousand years should be fulfilled: and after that he must be loosed a little season.” (Revelation 20:2-3).
During this thousand years of peace, “because of the righteousness of [the] people, Satan has no power; wherefore, he cannot be loosed for the space of many years; for he hath no power over the hearts of the people, for they dwell in righteousness, and the Holy One of Israel reigneth.” (1 Nephi 22:26). At the end of this period, the population (remember these are mortals) will again rebel against God and Satan will run free among those who would rather serve him.
“And again, verily, verily, I say unto you that when the thousand years are ended, and men again begin to deny their God, then will I spare the earth but for a little season.” (D&C 29:22).
This rebellion for “a little season” will culminate in yet another war, this one known as the battle of Gog and Magog. This battle bears a striking resemblance to Armageddon, so it can be difficult to determine which battle and end-of-days war prophecy is referring to. Ultimately, the result of Gog and Magog is the same as Armaggedon. The Lord will deliver those who remain faithful to Him, and Satan will be cast down.
“And when the thousand years are expired, Satan shall be loosed out of his prison,
And shall go out to deceive the nations which are in the four quarters of the earth, Gog and Magog, to gather them together to battle: the number of whom is as the sand of the sea.
And they went up on the breadth of the earth, and compassed the camp of the saints about, and the beloved city: and fire came down from God out of heaven, and devoured them.
And the devil that deceived them was cast into the lake of fire and brimstone, where the beast and the false prophet are, and shall be tormented day and night for ever and ever.” (Revelation 20:7-10).
If you are wondering how a people, subject to heavenly visitations and great gifts of the Spirit, can rebel against God, you can review 3rd and 4th Nephi. The calculated destruction of the followers of Christ was planned, but interrupted only by the advent of the Savior. Then the Savior cleansed the land of the unrepentant, following which He ministered to the survivors. He set up His church and kingdom among them and continued to visit them for generations. Then small, seemingly insignificant divisions arose. These increased to bigger divisions, and finally grew to outright rebellion. From here on out, the Book of Mormon is a tale of deterioration and war. The Millennium will have a different ending. It will also have the rebellion and war but this time, instead of the complete destruction of the righteous, it is the wicked who will be vanquished.
So yes, there will be a final great war following the Millennium, but this war will be fought on earth (note that the battle of Gog and Magog covers “the breadth of the earth” and lays siege to “the beloved city” “of the saints”). This war is really an extension of the war started in heaven. Cast out, Satan has taken his fallen angels and joined them with the evil systems of this world to wage war on the saints. Conversely, the saints of the earth will be joined by the angels and powers of heaven (see also D&C 88:111-116). With echoes of that first war, Satan will be cast out and the meek inherit an earth free of accusers.