There are a couple of things you can do that might help your idle issues.
First thing that comes to mind is that your IAC (Idle Air Control) valve is sticking. It's behind the throttle body (5.4l it's on the driver's side)
Here's a link of what it looks like:
http://www.smpcorp.com/buyersguide/images/AC158.jpg.
If you can find it, you can take it off and clean it using a Brake Kleen type cleaner to free up the valve that goes up and down inside the part. Just be careful not to rip the gasket.
Second, you could clean the MAF (Mass Air Flow) sensor (located in front of the airfilter box). Open it up and spray the cleaner over the two silver sensors (could be black if really dirty). Let dry and reconnect.
PS. Disconnect the negative battery cable before doing any of the work. This will make the computer re-learn your driving habits with the cleaned parts.
Just my two cents,
Good luck