I'm with Preacherman and those who have agreed with him on this one. For your own safety your gun should be under your control or locked up. Even without kids around, what if someone breaks in quietly enough you don't wake up right away? If he/she finds your gun before you get to it your gun could be used against you. That isn't to say to be without a gun.
While at home and awake you can always keep a holstered weapon on your person. Also, while awake you can have another gun in a quick access safe (as well as keeping one or more there while you sleep) so it is both locked up (protects not only against children getting a hold of it, but protects you against a BG getting to your gun before you wake up) and easy to get to quickly if you need it. Keep it bolted to your bed or the wall near your bed so you don't even need to get up to get to your gun.
Also, since you say "home defense weapon" and not gun, then you can also do something I do. What if the BG gets in unnoticed as previously mentioned and you wake with him in your room? You don't want to go for the safe (or for the gun if you do keep it more open) and get the BG's attention. I keep a sheathed fixed blade knife in my bed with me. I move around enough in my sleep that I don't want a gun (I don't know exactly where it will end up and it may be in plain sight, thus opening up the problem of the BG stealthily getting your gun before you wake again) but the knife stays put where I keep it for one thing, and it is smaller and thus less noticable to the BG.