Bender had a time when he had accidents in the bed a lot. We didn't know what was wrong but it turns out our mattress (that was left over from prior tenants) was pretty nasty on the opposite side. I think he was smelling it and peeing. He never peed on us, just on the bottom part of the bed. We tried to ban him from bed, but he looked so sad and lonesome down there...so we picked up our cuddly little bear of a puppy and snuggled him. We just changed sheets every night for about a week before we realized it was probably the mattress and got a new one. Now he's doing A'OK 
  
Bender took awhile to potty train, and we lived in a 1 room apartment until just recently...talk about going to the dogs for awhile 

 But we never yell in our house, so even though he probably doesn't understand us, we actually sit him on our lap and talk about the situation with him calmly whenever he messes up. He gets a "Bender, no." shock warning, but then it's all calm talks and eventual cuddles. We're such softies.