https://vester.si/bodily-oddities/oddities/hypnagogic-halluc...
>I also see a flash of light with my closed eyelids.
You might want to talk to a optician about that. It can be a sign of issues with your retina.
I see flashes in a dark room when I wake up, because I have PVDs (posterior vitreous detachment) in both eyes.
Edit: I just re-read your post. If they both happen together, I think it is something different.
It happens simultaneously with the sound, so I would guess it is purely a weird form of synesthetic hallucination.