If these are rugs you can hang up, then hang them outside. After a few days, there will be no musty smell. For carpets, get as much fresh air in as possible. Air has ozone in it, a natural odor destroyer. A faster way to eliminate odors is to rent an ozone generating air purifier - the ozone chemically breaks down (oxidizes) the "stink" molecules. These machines work.