The general rule of thumb for traveling with animals is to take a break every two hours. Besides the necessity of the bathroom break, it's a great opportunity for you to exercise your pet. A tired and worn out pet makes for a better travel companion, so you'll be doing yourself a favor if you take some extra time with it at rest stops. Make sure you have your leash ready to go at your rest stop -- your pet doesn't want to wait while you rifle through your packed bags.
You may find other dogs at the rest stop, and many have areas specifically designated for dogs. Take advantage of this. A 20- to 30-minute playdate with another dog is far better than a leash walk. But if there aren't any other dogs around, you need to walk or even run a high-energy dog. If you're traveling through wilderness areas, plan a mid-day hike with your pooch. You can also walk your cat -- just start that at home before your trip to get them used to being on a leash.