Different strokes for different folks.
A friend's brother awoke about 20 years ago now, just before a silent intruder pounced on him in bed. His S&W .357 revolver was on his nightstand.
A frantic fight for the gun ensued with both men getting really messed up, for about 15 minutes. During that time, the wood S&W factory stocks got broken off the gun, to give you an idea of how desperate both men fought for the gun. To lose that struggle meant death.
Eventually the homeowner got enough control over his gun to fire the one fatal bullet. He lived to have nightmares forever.
ME . . .
My kids are gone. My wife and I don't ever sleepwalk. Our Boston Terrier sleeps hard and he'd die for us but wouldn't be much of a threat.
My holstered M37 "sleeps" under the sheets, with a custom short-barreled M25-2 nearby too.
The 25-2 has a custom front sight that is as sharp as a razor on that short barrel. If an intruder tried to grab it, his hand would be severely lacerated as it was yanked from him.
My wife's 3" M37 Airweight is holstered, but concealed nearby too. She would use it if she had to of course.
No exposed nightstand guns for me! If I awake with someone in my room I'm going to remain very still as I gain my bearings, then slip the handgun out of the holster when I decide the person is a threat.
PS: SOME GUYS SHOULDN'T HAVE A LOADED GUN NEARBY!!!
My dad kept his loaded Colt Detective Special under his bed. He DID have dreams though, and one night a year before he died, and now a widower, he told me he'd had a very realistic dream that someone was coming down the hall and about to attack him. So he rolled from bed, kept low and shot at the intruder coming through the open door. It was at this time that he woke up from the dream, but no one was there, so he went back to sleep.
Just after he passed away, my brothers gave me his well-worn Detective's Special. My wife and I were sleeping in his house waiting for the funeral, and I decided to check his gun . . . remembering his vivid dream. Hmm . . . I wonder . . .
ONE CYLINDER HAD A SPENT CARTRIDGE IN IT!
I got low to the ground on the side of the bed he used and got a sight picture vantage point . . . then went to inspect the door to the hall. I FOUND THE BULLET . . . embedded half-way into the wood doorjamb. Yes, in the dream, and like a lot of WWII vets, he'd rolled to the ground, looked up and fired as he'd been trained.
No, folks that have dreams like that don't need to have a gun within reach for sure!!! Different strokes for different folks!