I heard stories in the past where generators in the back of pick-up trucks have overheated and caused fires. I have a generator and NEVER have I run it in the bed of the pick-up truck.
But running the generator a distance from the camper, where air can circulate around it, is perfectly safe and you can sleep comfortable.
Well, before someone jumps on the band-wagon and says, "Hey, what about those generators in motor homes and 5ers built in enclosed compartments?" I think their fuel supply does not come from a tank attached to the tank. And they are vented and have proper exhausts.