Permitted stopping time at rest areas varies by state. Often the pertinent laws are posted on a signboard somewhere at the rest area. I don't think I've seen less than four hours as the maximum, but I can't say I've studied every state's laws. Also note that oftentimes parking and camping are a little different to the state; "no overnight camping" can mean "don't set up a tent or pull out your awning or roast marshmallows over a campfire," rather than "don't sleep in your parked vehicle overnight."
One of the reasons why they have "safety rest areas" is so that tired long-distance drivers have a safe place to stop and take a nap.