And it'sThe Encyclopedia of Catholic History says that the two councils which talked about relics were the Second Council of Nicea. Your question was met head on, but with little explanation except:
How much more is it necessary that in the churches of Christ our God, the image of God our Saviour and of his spotless Mother and of all the holy and blessed fathers and ascetics should be painted? Even as also St. Basil says: "Writers and painters set forth the great deeds of war; the one by word, the other by their pencils; and each stirs many to courage." And again the same author "How much pains have you ever taken that you might find one of the Saints who was willing to be your importunate intercessor to the Lord?" And Chrysostom says, "The charity of the Saints is not diminished by their death, nor does it come to an end with their exit from life, but after their death they are still more powerful than when they were alive"
The second council is the mysterious council of Constantinople in 1084 that I can find nearly no information on.
It's a dogma that the blessing of God stays with things and places, so one ought to take it on faith.
the Council of Trent (1563) defended invoking the prayers of the saints and venerating their relics and burial places.
The sacred bodies of the holy martyrs and of the other saints living with Christ, which have been living members of Christ and the temple of the Holy Spirit and which are destined to be raised and glorified by Him unto life eternal, should also be venerated by the faithful. Through them, many benefits are granted to men by God.
Fr. William Saunders - WHY DO WE VENERATE RELICS? - EWTN
Furthermore, relics are often kept in a place that requires a pilgrimage to go to. The Canon law stipulates that relics cannot be transferred permanently to a new home without consent of from Rome.
Relics of great significance and other relics honored with great reverence by the people cannot be alienated validly in any manner or transferred permanently without the permission of the Apostolic See.
So either you need to make a pilgrimage to see them, or they do (as was the case recently when we viewed the relics of St. Maria Goretti that toured America last year)
The pilgrimage itself, acknowledged throughout the history of Christendom, is a powerful prayer. It's like the 4 men who lowered their friend in through the roof to be healed by Jesus, it's a lot of work to get there. But by their faith they're healed.
In summary, relics are sacramentals (tactile reminders of invisible realities) that are concrete prayers tied to times and events in history where God's grace was most evident.
TL;DR;
Anathema to those who dare to say that the Catholic Church has at any time sanctioned idols.