C.S.
My niece did this often and we used to blow directly on her face and it would startle her into breathing again.
My youngest also did it for a short while, used the same technique and it worked.
Many adults do this too when they are extremely upset. Just remind them to breathe.