That's partially true. It depends a lot on how you go up the hill. If you put the hammer down and charge up the hill with a trailer, you'll never gain the fuel back. The key to good milage is to take it easy going up hills. If you try to hold your speed, and the engine goes into open loop where the fuel/air ratio goes from 14.7:1 to maybe 13:1 or worse, spark timing is retarded, and the transmission kicks down a gear or two, you waste a lot of gas getting up the hill, and you'll never make it up on the backside.
The same is true with an RTT, but I think to a much less effect when talking about hills specifically. Since they weigh so much less than a trailer, they have less effect going up hills.
So, when I'm trying to supermilage with the trailer, I really let it slow down going up hills. I have a Scangauge, so I keep an eye on the open/closed loop status. I will let it slow down within reason, to keep it in closed loop if possible. I will also preferentially kick it down into 3rd gear manually if required. I'd rather be down a gear, than go Wide Open Throttle. Basically, after about 1/2 throttle, you're pouring the coals to it, and Brake Specific Fuel Consumption goes to ****.
If you're in an area with rolling hills, I like to build up a head of steam on the backside, and then "coast" up the next hill. I'll exceed the speed limit within reason, building speed with the throttle less than 1/2 way, so that I can climb the next hill at less than 1/2 throttle, bleeding off speed.
Obviously this all takes some extra effort, but it pays off.