Among premillennial interpreters there is a healthy debate about when the battle of Gog and Magog will take place. I see four possibilities:
A. Sometime before the Rapture.
B. Early in the Tribulation.
C. Near the midpoint of the Tribulation.
D. Just before the Battle of Armageddon.
I don’t think the Bible gives us enough information to be dogmatic. In a recent article on this very topic, John Whitcomb argues for C. Near the midpoint of the Tribulation. His argument seems cogent to me.
I think the mention of Gog and Magog in Revelation 20:8 refers to a completely different worldwide rebellion at the end of the millennium.