It sounds like you have met my dog Homer!! HaHa. When I first got him he was great! Then he started sleeping with my husband and I, and he kept going to my husbands side of the bed and pooping or peeing at the foot of his side of the bed. I finaly figured out why Homer was doing it. He was so small that he couldnt get back on the bed after he got down to go potty the first few nights, so he learned quickly that if he went potty at the place farthest from where he had to sleep it would be ok....... (not ok). After I firgured this out I left a blanket on the bed that hung off the side. It is the craziest thing, but he didnt have anymore bed accidents again, because he could get down, go potty, "climb" back in bed & get a treat in the morning for being a good boy. Good Luck with the potty training... sometimes the solution is easier than you think