It may be nreves, especially if he is not doing it anymore. Or he may be trying to mark his territory or there may be old accident smells on the carpet & he thinks it is allright as he smells it.