Electronics
I know if you remove all electrical power, your computer will have to re-learn all of its settings it had. That could take several hundred miles before it adjusts its programming to your driving, but I've never seen much of a mileage dip any time I've done it.
Assuming you disconnected all electrical power, the only thing that I can think of is that something happened when you re-connected the battery. The surge may have damaged something (or blown a fuse) or just caused some confusion in the programming (like a chip or tune). Again, this is just speculation.
If it were me, I would park the truck and disconnect your battery (batteries), turn on the headlights to make sure that all the juice is drained, wait at least an hour or so for any residual power to be gone and let the computer reset, reconnect the battery (batteries) and try again. Sometimes with electronic stuff it gets a glitch that it just can't get rid of and you have to do a hard reset to clear it. Best of all, it's free to do.
Just my .02
Its a diesel with a dual battery system. Only one of them tested bad. the other was okay so I didn't replace it. I don't run any chips/programmers. It's a bone stock 6.0 2006 F250. Plenty of power and torque for what I need. The mileage has been gradually increasing from 7 to now about 9. I hope it"ll continue the same trend.





