TIL about exploding head syndrome, which causes patients to hear a loud, frightening noise when falling asleep or waking up. Up to 10% of people may have it, but cases often go undiagnosed
For why this is happening to me, I've narrowed this down to the following: snoring (I start snoring as soon as my eyes close), dreams (I have "imaginative" dreams, a lot of nightmares) and the last reason being lack of sleep to which I think I've actually heard the explosion but it was a dream.