When I did the cheap and easy bed holster some people asked about a similar idea for a shotgun. I putzed around for a while then one day I noticed some cheap plastic over-the-door hooks for clothing, coats, etc. and it occurred to me that a couple of them would work just fine hanging over the bed rail and spaced such that one is holding the gun by it's loading port and the other near the muzzle.

It's not rocket surgery brilliant but it works for the intended purpose and they only cost about $2 each.

A note of caution - if there is ANY chance whatsoever of children or other unauthorized persons encountering your weapon, LOCK IT UP.

I replaced the standard interior door knobs with exterior key-locked knobs on the doors to my bedroom and my home office. All guns (and anything else I don't want prying eyes and little fingers on) are kept in those two rooms.