I've had dogs pee in my bed, and one actually poop in my bed before (more precisely, on my pillow, and woke up with it tangled in my hair... good times). But generally they don't if they're housetrained - he's definitely big enough to be able to jump off the bed by himself and go to the door if he needs to use the restroom.

That said, I've had more accidents from my little sisters than I have from any of my pets