It really depends on the truck. Most trucks these days are designed such that a tonneau cover will help mileage, but running with the tailgate down will make it worse. They are designed such that a vortex is created by the bed, thus pushing air flowing over the cap, up and over the tailgate. With the tailgate down, the vortex isn't created, and it changes the airflow. A tonneau will help the mileage because creation of a vortex is also creation of drag, but because the vortex helps reduce drag elsewhere, it's a net decrease in overall drag. So if you don't create the vortex, it's not creating drag, and the air coming over the cab and still flow much like it would if the vortex were there.
As for toppers, they also disrupt the flow of air coming over the cab. If they are taller than the cab, that makes it worse. They add drag and weight, so they are usually worse than nothing at all.
TV: 2013 Ram 2500 4x4 mega cab w/6.7l Cummins
Trailer: 2013 Palomino Puma 27SBU