A sudden noise during the night such as my little dog started barking up a storm, or the security system alarm going off, or the sound of a door being kicked in, etc. will hopefully wake me. I would likely grab the gun closest to where I am when in bed, i.e., the bedside stand drawer, which is a 40S&W loaded Ruger sr40c with a 14 round magazine. I would hope that I could exercise sufficient self control to NOT go on a search mission trying to find the bad guy, but would get behind my dresser, facing the door to the bedroom and be prepared to shoot if the thug starts to open that door. If I have a second or two after grabbing the gun I will grab my eyeglasses. If I have a few seconds more, I will slip on basic hearing protection. With enough time, I will dial 911 as well.
I am fairly well deaf already, having suffered major hearing loss from unprotected ears during my year in Vietnam (which is coming on to 50 years ago as of August). But my priority is being ready and able to protect my life and the life of my wife. Second priority is protecting my dog. Third priority is protecting my hearing. Needing a gun in my home when I am not yet in bed would likely result, based on where in the house that I am, of grabbing my 17 round Glock 17 or possibly my S&W Model 19 loaded with 6 rounds of 38 +p. Any of my guns would likely cause short term additional hearing loss, but not as severe as if I was using 357 magnum.