I’ve had the same thing happen to me as a hockey and lacrosse goalie; it has something to do with causing swelling around the artery that supplies blood (and oxygen obviously) to the brain, constricting the flow. You end up seeing almost nothing but blinding white light in your eyes, have almost no proper balance, and yes you can even pass out. Usually it will pass after 5-10 minutes if the swelling is not too bad or you get ice on it.