My current bedside pistol is a railed Wilson Combat Beretta 92G with a Streamlight TLR-2 flashlight/laser. I absolutely, 100% recommend a railed handgun with a light attached. Also keep a handheld light on the night stand for general use. Reason being, flashlights get misplaced, knocked off nightstands, wife used it and didn't return it, kids played with it and didn't return it, etc. If the flashlight is mounted to your pistol, it will never be misplaced and you will always have a light available.
As far as flashlights, I personally avoid the Chinese deals that are $40. My bare minimum light is a stream light TLR-1. The new ones have 800 lumens, they will last you a life time, so spend the money to get a quality light.
Also, I consider the pistol to be a backup weapon. If I hear a bump in the night I grab an AR-15, which also has a quality Surefire flashlight mounted. Long guns are more accurate, 3 times as powerful, and rifles hold more ammo too.