After several years traveling and sleeping in hostels, vans, cars, crappy motels, etc I've developed a method that works for me.
First thing is wearing earplugs. Next is covering up any flashing lights with electrical tape. Some people find blindfolds helpful, but I've never needed one.
When you're asleep there's a small part of you that stays alert, monitoring for danger. This warning system is slow to adapt but it can learn. Living in the same house for years it learns to recognize the sounds of the heater turning on and off, the movement of your partner next to you, tapping of pets walking down the hall, etc. The alarm system eventually realizes those things are not dangerous and stops waking you up for them. In a van the environment keeps changing so it can't adapt quickly enough. When I move to a new place or have trouble sleeping I'll take a moment to talk to my alarm before going to sleep. I tell it that the doors are locked, the neighborhood looks good, I have no possessions with me that cannot be replaced, that I'm unlikely to be in physical danger, and that it doesn't need to wake me unless it smells smoke or hears a tapping on the window. I'll list the noises and such I'm likely to encounter while asleep and assure myself that they are safe.
It might sound silly but it works!