You're going to get one or two opinions on this one.
It depends on many variables, but best to have available and use that which you are best trained and competent to use.
Since your scenario is that they are already inside, speed is paramount, so the closest gun, the night table pistol is grabbed first.If you thought a person has entered your residence in the night while you are sleeping, what gun would you grab first? Shotgun or pistol and why you chose that one.