Wild camping isn't an offence in England (there's no statute against it) but you may be trespassing (a civil law matter) if you do it without the landowner's permission.
Sleeping in a lorry, car, campervan etc (regardless of whether you call it 'camping') is subject to the same civil laws of trespass, if you're talking about private land. It might be tolerated, it might not - it's up to the landowner
On a piece of land forming part of the public highway (eg a layby, I guess) then you're going to be subject to general road use/parking laws, and then whether the police decide to enforce them. Generally, someone parking quietly overnight and not causing an obstruction ornuisance isn't going to raise their concerns.
For a commercial vehicle they probably couldn't move the driver on anyway if the driver has to take their break under driving hours regs.