One good thing about the Mossberg 500 is that you can keep it closed on an empty chamber, which makes unwanted discharge by a child or a bad guy unlikely.
You on the other hand, will know to press the bolt release (behind the trigger guard,) rack the slide, and flick off the safety before pulling the trigger.
You should be comfortable leaving a shotgun next to your bed with one in the chamber and the safety in the off position for primary immediate use. Someone can be in the room and stab you with a knife or take the shotgun away from you and kill you with it in the time it takes you to wake up, sit up or get up, grab the shotgun, remember the condition of the shotgun, and go through the above routine.
With a double action revolver, you grab, point, and shoot. You can do it on you back or side in bed with either hand. With a shotgun, you are pretty much limited to using your dominate side and you have to be in a position to bring it up to your shoulder or hip before firing. Shotguns are great if you are up and awake. Yes, I have racked a twelve-gauge riot gun and stopped several people in their tracks. But, I wouldnt want to do it just waking up in bed with someone coming through the door.
Personally, I keep both next to my bed, the revolver for immediate action on waking and the shotgun with an empty chamber and safety off for going to investigate a noise. Racking in that condition may be enough to scare someone into leaving, but dont count on it. If you are not prepared to point a gun at someone and extinguish their life without pause, then stick with a dog and a baseball bat. Someone will take the gun away from you and kill you with it if you havent practiced and arent fully prepared to use deadly force.
You may have noticed that I said point and shoot. You can aim with time. You should practice point shooting at close range. Have your finger off of the trigger and pointing down the side of the gun until you are ready to kill someone. Point your index finger at them before dropping your finger to the trigger and squeezing two rounds off into their center of mass.
If you have small children who may come into your bedroom during the night, then ignore everything above and go with a shotgun in the safest mode and a dog for early warning. If you have family in other areas of the house, you have to be aware of who you are pointing the gun at and where the rest of your family are before pulling the trigger.
Shotgun rounds can go through walls and handgun rounds can go through your house and the neighbors houses. There was a methamphetamine house in my sister-in-laws neighborhood block. Someone was shot and killed over a drug dispute. The round went through the body, through the exterior wall, across the street, through the exterior wall, and lodged in the interior wall of their neighbors house. Choose your gun and ammo wisely depending on your family and neighborhood to cut down on the possibility of collateral damage.
No, I am not a law enforcement officer, but I have stayed at a Holiday Inn.