I'd very much put this conundrum into the 'Should bring disaster of one sort or another onto the character' category.
You mention whether you can cast the spell 'before' the effect, depends on whether there's a somantic component to the spell I suppose, you can't start to cast the spell, then get your bags ready, then finish the spell, then... but I suppose you could use a foot to drop one into the other...
In terms of game mechanics, obviously the timing of the spell would affect where the character was when one bag went into another (whether the whole bag or just the first thread of it needs to go in the produce the effect), ultimately the destruction/gate effect either happens before or after the spell activates, at a nano-scale of timing so either the character is still where the bags are if they do it by hand, or if they use some kind of gravity/delay mechanism to have one fall into another then sure, they're wherever they are and the bags are... well, no longer wherever they were when it happens. Same as if they cast the spell and a nearby character puts the bag into the other bag before or after the spell activates - when you get to a sufficient level of time slicing, nothing is simultaneous.
Either way, Misty Step is short range, quite possibly less than the reach/size/spell/psionic range/maw size of something horrific that I'd be pretty sure to decide emerges from the gate to see what all the commotion is.
Opening a random gate to the Astral plane by such shenanigans would invariably be a bad thing in my campaign... it doesn't mean you can step through it or benefit from it in any way, it's an Astral gate, it's not under your control and doesn't want to be your friend.
And where are all these bags of holding coming from ?? - seems such a waste.
Call me a purist but this kind of thing smacks of trying to exploit wording in texts that the characters themselves don't have access to - there aren't game rule books in the D&D universe, just in the real world and in the end, the DM decides how they want to interpret the rules. I'd suggest just fighting the monster and using the 2 bags of holding to carry its loot away.
There's more pleasure to be had in playing the game than playing the rules so as a DM I discourage this sort of play.