Yes people can get a good rest while camping, however I wouldn't expect people to get a complete rest while in a dungeon or even in the wilderness when the wilderness has monsters that are attempting to eat you. Our ancestors didn't have to fight off goblis, orcs, ogres, owlbears or what-not.