I've heard or seen the idiom 'chewing the carpet' a couple of times today (eg here) in connection with Gordon Brown as a candidate for head of the IMF. The Guardian article just linked to has the sentence: "A more intriguing UK outsider, in every sense – and absolutely guaranteed to have Brown chewing the carpet – is Peter Mandelson".
Chew, or chewing, the carpet is not in the OED but it is in Jonathon Green's Dictionary of Slang. Green describes it as being US slang from the 1950s and defines it as 'to lose emotional control, to have a temper tantrum'.
Do not confuse 'chewing the carpet' with 'chewing the rug'. That's not in the OED, although 'chewing the rag' is, but both phrases (rag/rug) are in Green's dictionary and in the late 19th century meant 'to gossip' or 'to chatter'.
Do not confuse 'chewing the carpet' with being 'on the carpet', which is a late-19th century US expression meaning 'about to face a reprimand'.