There are a couple of reasons why running a cable underneath a carpet is dangerous.
- People tend to forget about them, the constant walking and stepping on them can cause wear, leaving the copper wire exposed.
- Over heating of the cable which might cause the cable to melt and cause a fire.
Can it be done at all? Well yes, temporarily and under supervision. Otherwise to be left there for weeks/months I'd say, better be safe than sorry.
Wires are a risk of fire in normal environments as it is, if you put them under a carpet the risk is doubled the least.