Not a bad idea - ASK if there are unlocked guns where your children play!
In lieu of keeping a loaded gun in your house, consider keeping your car keys next to your bedside. That way, if you hear someone breaking into your home at night, or attempting to break into your home, you can press the panic button and set off the car alarm. It will keep honking until your battery runs down or until you reset it with the button on the key fob chain, and after a few seconds, all the neighbors will be looking out their windows to see what's going on out there. The intruder won't like that and most likely won't stick around. It's a security alarm system that you probably already have and requires no installation.
This might also be useful for any emergency, such as a heart attack, where you can't reach a phone.