Since carpet padding is sort of a closed foam, it will only act to deaden the enclosure (which may be your goal) however, it will take up space in your enclosure, making it smaller.
THe benefit of insulation or polyfil is that air is still able to move through it. Ultimately it takes up very little "airspace" in your enclosure and slows the moving air in a box.. reducing the amount of friction between air molecules thus the box "appears" bigger to the driver... particularly in sealed setups.
If you are looking to deaden your box and can afford the few cubic inches it will occupy, then, yes go with the foam.