I have a 9mm pistol on both sides of the bed, but if something goes bump in the night, I go for the Benelli M4 with tactical light which is 3' away from the bed. I have a Remington 870 stashed downstairs. If I have to pull the trigger, I want the most lead on target as fast as possible. Maybe I'm just naive or presupposing most scenarios are best solved with a shotgun.
One scenario I can think of where I'd prefer a pistol or an AR ... is a hostage situation where a more precise shot is required (over a shotgun).