>>33234774 (OP)Exploding head syndrome is what it's called. Where you hear loud or sharp noises before sleep and it startles you awake.
The causes are usually unknown but it's easy to guess what it is - stop using computers/phones/tablets 2 hours before sleep. It will stimulate your nervous system as always, but if you do it before bed, it means your nervous system is firing off before sleep. Which means you get random shit like hearing loud explosions or crashing sounds randomly on the edge of sleep. It's cuz your nervous system is overworked.