UV and heat is the most common cause , however some foams will always perish or disintegrate over time , depending on its composition.
You need to "burn in" your phones to get back to the same sound if you changer the foam pads. What I mean is you actually have to listen for some time as the new foams wont compress or be "as shaped" as the old stuff.
You can store your headphones on a styrene dummy head which also helps "reform" the foam.