There is no criminal offence involved if you are sleeping in your car, unless you are under the influence of alcohol or drugs. It's recommended that you take regular rests, including naps in your car if you are travelling for long periods of time.