ROCKFORD, Ill. (WTVO) — If you’re on a road trip through Illinois and it’s getting late, and you don’t want to pay for a hotel room, you might be wondering — is it illegal to sleep in your car?

The answer is: there are no laws prohibiting a person from sleeping in their car in Illinois.

However, there are rules about where you can park for an extended period of time.

According to the Illinois Department of Transportation, travelers can only park in rest areas for three hours, and they are not allowed to sleep or camp in rest areas.

There are 30 rest areas and 11 welcome centers open 24 hours a day along Illinois highways.

Some areas that could be considered are truck stops or well-lit parking lots, although keep your safety in mind if you do and you’ll likely need to get permission. And, many cities, such as Chicago, have stricter parking lot laws.

If you choose to sleep in a car on a residential street, you could find yourself in trouble with the residents who live there.

And, you can be arrested in Illinois for sleeping in your car while intoxicated. Illinois law says that even if the driver was not intending to drive if a court is able to prove they had the ability to drive drunk, they can be convicted.