I keep my shotgun with the magazine loaded but with no round chambered under my bed at night and then lock it in my cabinet (which is secure and hidden in my closet) during the day. Something happens, I can grab it, hit the slide release and cock it in far less time than it would take someone to make it from the front door to my bedroom. I'm a light sleeper and have two roomates who are also light sleepers about halfway in between the only door and my room. I always figure if I hear them shout or raise an alarm I'll have an edge.
On the other hand, if we ever have guests or ESPECIALLY if my younger sisters are over, I sleep with it completely unloaded with a box of 000 buckshot in my nightstand. My way of thinking is that if someone were able to get the unloaded shotgun, find the shells, load it and use it it would be well beyond and accident, and since I'm always home when the gun is out of the cabinet...I don't worry too much.
Don't know if this is 100% the best way, but I feel secure (both from attacks and potential accidents) this way. Takes about 1 minute every morning and night to get the shotgun to/from the cabinet, and I'm in my closet getting dressed anyways.