I have this problem sometimes too but here are some ways to fix it:
Turn off the A/C and leave the fan on high a few minutes before you park. This lets the vents and fan get dry before you shut off the truck so it doesn't have a chance to mildew.
If you have the mildew smell, turn on the truck and put the fan on MAX AC and crank it up to high. Then, spray some lysol, oust, whatever your favorite air disinfectant is and shoot it into the floor vents. The MAX AC setting recirculates the interior air so it will suck it up through the floor vents and run through the whole system killing any mildew or mold and making the air fresh.
If you have a smell in your truck that you dont want to be there the next day (like cigarette smoke, Red Lobster leftovers, a nasty ol beer fart, whatever) don't use MAX AC or it will suck in the smell (by recirculating the air) and still be there the next time you start the truck and run the vents.
'03 XLT/FX4 L1 4x4 4.0 Arizona Beige Automatic (my weekend ride). '16 Ford Escape Titanium ecoboost (wifes ride) '16 Ford Escape S (my work ride)