Actually it is lawful to have a hand gun with the bullets in a magazine in your safe . Magazine can't be in your gun but it can be right beside your gun . Safes these days can have a 6 digit code to open them up . Just keep a flashlight on the safe incase it's dark and you can't see the numbers to punch in the code .You keep the gun loaded inside the safe, and it takes mere seconds if you own a fingerprint scanning safe.
With a bit of practice you should be able to have that gun in your hand and ready to fire within 5 seconds:
http://www.survivopedia.com/keeping-guns-ready/
All I know is if I lived in the US I'd want a gun next to my bed. In Canada I dont feel we need it as much.
I do own a hunting rifle, but I keep it nicely locked up in a separate room. Never had any problems
Couple of seconds and your safe is open