How to I stun the Egyptian Zomboss?

Sometimes, when battling Dr. Zomboss in the Egyptian fight, I manage to do something that put him in a stun animation. What is the trigger for that, or is it purely random?


There is a distinct animation he uses indicating he's about to charge, taking out two rows of plants. If he takes a certain number of hits during this time, he will be stunned.

The most effective way to stun him is by using a plant food on a bonk choy at just the right moment.