I keep all my guns loaded for 40 years, "Pistols,"I also keep them in holsters strategiclly places through the house. If I have company Like today, My 2 grandkids are over with their parents, Everything gets locked up except 1 gun that stays on my person.
I have never picked up a gun and fired it for no reason, unless I was working on it, either adjusting the trigger polishing etc. An unloaded gun is like not having one. There are a tremendous amount of "new shooters" out there who just don't have the time or experience that goes along with firearm ownership.
I can't say "this could happen to anyone, only because it just violates so many rules.
I think that perhaps a new shooter shuld not load a semi auto handgun unless he is going to shoot it. This would avoid a large amount of the problem, clear the handgun, retract the slide and leave a mag neer the gun. If you need it all you have to do is pop in the mag and release the slide, "1 second". this way you can see chamber is empty and this will remove any question weather it was loaded or if one was in the pipe. Dry firing when in bed is reminisent of a kid with a new toy, who can't wait to get it unwrapped and play with it. You will get over this soon, you may vever forget it and this will make you a safer shooter, as no feeling in the world will snap your but back to reality like a gun going off in a house. Learn to forgive yourself, as you are not the only guy or gal who ever did this, it will give you a new respect for guns. And remid the wife next time she backs the truck into a pole or garage door, that stuff happens. Don't cower over it, and don't allow it to become the topic of conversation for the next 6 months or every time you make a mistake having it brought up. I don't know what kind of wife you have, but most of them like to have something they can bring up in social situations if they have a few too many or just are angry about something unrelated. If that happens, make sure you nip it in the bud. You already confessed your sins here and it's done.