I could be a metal holding collar around a section of the exhaust pipe which once the exhaust heats up, and so expands, fills the collar, stopping the rattle.
Depends if the rattle actually comes from the engine or not. If it does come from the engine it can be caused by the lubricating oil settling into the sump. When you start the car from cold it takes a small amount of time for the oil to circulate to all parts of the engine and the rattle then disappears.