I have this. When it first started I thought there were like secret gang wars going on in my apartment complex. I would wake up hearing a BANG. I called 911 a couple of time even thinking it was gunshots, but they police said no one else heard anything. I started asking my neighbors if they had heard it too. That's when I started to realize that I was hearing things. I talked to my doctor and that's when I learned about exploding head syndrome.
I've noticed my brain tries to instantly construct a story to account for the noise, like someone is kicking in the front door, gunshots outside etc. I think the order of thoughts / senses while in that half-asleep state is fluid enough that my brain manages to make it all feel like it happened in the order it would if real. I've got up to answer the door more times than I care to remember.