Enhancement of the spin Seebeck and spin Peltier effect in multilayers