Trauma to the head can cause damage to the inside of the eye.
The sack containing the vitreous jelly is secured to the inside of the eye.
Trauma or shock can make the sack pull against the securing points.
If the trauma is sufficient, the sack may tear away a section of the inside wall of the eye.
This may result in flashing lights being seen in the peripheral vision ...
... and a sudden increase in the number of floaters may be noticed.