Is it legal to bring Tramadol into Italy?
I see no reason why not. There is no restriction on bringing prescription medicines into the EU. It is available in Italy.
And of course you are very unlikely to get stopped by Italian customs when entering the country.
They sell it in Italy in many forms, so just keep yours in its prescription bottle. https://www.federfarma.it/Farmaci-e-farmacie/Cerca-un-farmaco.aspx
As long as you're not bringing in boxes of it (for potential resale), they won't care.