He's a furbaby, when you gotta go, you go. The good news is he's letting you know he has to go. You could be waking up to a mess every morning. Princess will be three next month, and I still let her out at night. Yorkies are just like kids.
It's bad for them to hold it, and like I said at least he's letting you know.
Good Luck