Sleeping in a car is perfectly fine in Japan as long as you are parked legally, but if it is in a crowded area you may be asked to move on, so best to stick to quiet spots. (best not to whip out the BBQ)
There are plenty of parking spaces throughout all cities in Japan and it is perfectly fine to leave your car parked there however there is usually always parking meters and in the central locations they can be quite expensive (you have to be careful around Tokyo).
The best places to park are the roadside rest areas, which are unique to Japan, they usually have the bathhouses there and shops and they are free to spend the night in the car. Here is a link to more information: https://www.michi-no-eki.jp/stations/english We provide a map with locations to these spots and other recommended spots when you book. (most onsen away from the city center have people sleeping in motorhomes in the carparks)