Thermally Driven Assembly of Nanoparticles in Polymer Matrices