William Nazaroff and Glenn Morrison at the University of California at Berkeley started doing experiments on carpet samples to see what the culprit was. They found a bunch of chemicals called aldehydes that were responsible for the nasty smell.
There are few insects more reviled than the cockroach. Maybe we’re just jealous: cockroaches were around long before humans, and will continue to do their thing long after our species has gone the way of the woolly mammoth.