I had the same problem for years until I suddenly realized that my dog had the key to my bedroom and he was using it to get in.
I took it away from him, but that did not solve the problem, as being a pug, the most conniving and intelligent of dogs in my opinion, he merely took a night-school course in breaking-and-entering and now he gets in all the same by various means.
I have tried installing a burglar alarm, but he learned how to de-activate it and I have tried hiring a security guard to keep him out but he just drugs the guard's coffee and slips past.
I am at my wit's end and can't figure out what to do next.
I have thought I'd move to a new house and not give him the address, but I'm certain with his internet skills he would suss-me-out in no time.
Good luck with your problem. I have resigned myself to catching cat-naps while my pug watches Charlie Rose on PBS--the only time he leaves me in peace.