What does Judges 7:22 mean?
Gideon's plan (Judges 7:15–18) worked perfectly. His 300 men spread around the perimeter of the camp, in the dead of night, blew trumpets and smashed pitchers and shouted battle cries while holding torches in the air. The Lord uses this panic and chaos to convince the Midianites and their allies that the attackers were already in the camp (Judges 7:19–21).Those awakened by the noise and lights assumed they were surrounded and under attack by a massive army. They cried out and tried to run away, likely straight into armed guards just returning from their late-night duty, and assuming them to be the enemy. They began fighting each other. That would lead others, coming across a skirmish, to assume some of the men were invaders, and attack them. In this way, the whole Midianite army is thrown into utter chaos. It's unclear how many died in this way before the army could reorganize enough to retreat from this phantom battle.
At some point, they gain their senses enough to start running in the same direction: east. Whether the entire army stayed together, or split as they ran, Scripture does not specify. The location of these places is not known with certainty to modern scholars. The general idea is that the Midianite forces fled toward the Jordan River, hoping to cross at the fords and escape into the desert beyond.