To much freedom to soon can cause a lot of it. They have to have certain boundaries set, before they get more. My girl is almost 2 and if we leave her out of her crate at night she will potty somewhere in the house. After a few nights of her crying and getting everyone up at 2am I moved her to the farthest end of the house. She finally got the idea that no matter what she said it was bed time. There is no food after 6pm and no water after 9pm, usually. Once she got older and her bladder got stronger that changed.
THe little ones need to spend at least 30 minutes outside if possible, before bed, so they can fid plenty of spots to potty.Try crating them at night you might have a few accidents, but that shall past with time. Hopefully. Once you have done that and have gone a few weeks without wake ups or accidents move thier crate closer to your bed, then if possible put it on your bed. then take them out and see where you stand.
THese are just things that work for me and my pets. We all know that yorkies are a different story.