Kash has been sleeping in my bed with my bf and i since i got him at 9 weeks old. he's never had a potty accident in the bed, but in the beginning, he did jump down and pee on the carpet about 2 -3 times before he eventually began sleeping through the night without needing to go potty.
he's a smaller yorkie (about 3 lbs at 6 months old), and neither my bf or i has ever rolled over him, and he's never fallen off the bed by accident...
i guess it all depends on you, but now that Kash is used to sleeping in the bed, it'd be next to impossible to make him sleep in his x-pen. so, choose wisely young grasshopper.