The illegality of sleeping in a motor vehicle refers to being under influence (drugs or alcohol ) it is the fact that you might drive a car in that state and they will investigate why you are there. Motorhomes are locked shuttered and private for any activity you might wish to partake of that make it private space that is not open to view or interfere with. Sex in a car is not private, but Dogging, in a closed motorhome it is in private.