There's no specific federal law that expressly forbids sleeping in your car. However, there are federal laws that indirectly limit the instances in which sleeping in your car is legal: Private Property Laws: Trespassing on private property is a quick way to make sleeping in your car illegal.