Healthy dogs won't eliminate where they sleep.
You can use this to potty train a puppy when you work.
Leave a puppy in a crate to sleep and then take him for a walk as soon as he's up.
When he gets outside, he will eliminate, and you can reward him to make the behavior stick.