Not trying to be argumentative, but some of the things said above contradict each other and I don't think we can broad brush say these things are not happening.
It is not a stuck mash. Wort is still flowing through the mash bed.
It is also not due to too high a flow rate. You can reduce flow to a trickle and it doesn't help.
If wort were still flowing, then reducing to a trickle would absolutely help. However, if reducing the flow rate doesn't help that would indicate that no wort is flowing. Can't have both. Gotta pick one or the other.
Also, it can very easily be caused by too high of a flow rate, for a couple of reasons. First, the high flow rate could cause the problem to begin with. If you start the flow rate too high it has the potential to compact the grain bed very tightly, causing increased restriction to the flow. Increased restriction means less wort to the pump. Second, even if the grain bed did not compact, if there is enough liquid under the basket/false bottom and your pump can pump faster than the wort can fall through the grain bed, then it will absolutely overflow the top side of the kettle.
This is a simple mass balance and there are two possible solutions. Speed up the rate at which the wort can fall through the grain or slow down the rate at which it's pumped from the bottom to the top.
In the times it happened to me, it seems to be caused by an air pocket that gets trapped under the bag. The bag is pressed against the kettle wall by the weight of the grain. Evidently, air gets trapped below the bag. Where does it come from? That's not clear to me. Possibly it is cumulative small bubbles coming off the heating element as well as entrained air from the grain that gets pulled under the false bottom. Not really sure about that. But somehow an air pocket forms under the bag and eventually this air pocket starts effecting flow.
In my case when this occurred if I pulled the bag away from the side to "burp" the system, there would be a big rush of air from under the bag once I got it released. The system would then run fine again at the same flow etc. (so again, it is not a stuck sparge and not related to too fast flow rate).
The vapor pocket that is developed below the false bottom or basket, whichever being used, is caused by pumping the liquid out, not by developing an air pocket in. The pocket is created by the vacuum induced by the pump impeller. There very well could be a substantial amount of air in the grain bed before it's fully wetted. If there are bubbles coming from the heating element that would be steam. Hopefully the element isn't firing enough to generate steam, but if it were then the steam pockets would quickly collapse and turn back to liquid at the conditions we're operating at. Steam is definitely not the culprit.
The big rush of air you're feeling is caused by the water falling into the vapor space and pushing the vapor out the newly formed passages you created by lifting the bag.
I think most other BIAB systems put the bag in a basket (like the Bayou classic) or use a stainless basket (COFI) and in either case there is a gap between the mash and the kettle wall that prevents trapping air.
Are there other BIAB systems with the bag against the kettle wall and do they also have this problem with entrapped air?
I have a Bayou Classic, I use the steamer basket to support the bag and keep it off the element, and I have still gotten a vapor pocket under it. The use of a basket doesn't prevent this from happening.
I use a @Wilserbrewer bag in my set up. This bag is awesome. It's so awesome that it might even be trapping so much flour from my fine crush that it's plugging up. That's why I plan to loosen up on the gap setting. Or maybe if I just conditioned the grains it would reduce the amount of flour that's produced. That's something else I need to try.
Anyhow, feel free to poke holes in anything I've said. I don't take myself too seriously, and oftentimes I'm wrong about stuff, so it won't hurt my feelings.