Hajime Hosogai gave hosts
Stefan Kiessling put them ahead before half-time and second-half strikes from Sam and substitute Eren Derdiyok made the result safe.
But the lead lasted barely 60 seconds before Kiessling threaded the ball through and Sam fired right-footed into the bottom corner.
Michael Ballack’s low drive was turned away by keeper Simon Jentzsch but
It was 2-1 midway through the first period when Renato Augusto laid the ball off in the area and Kiessling beat Jentzsch with a low finish from 12 yards.
That was how it stayed until half-time as Sascha Molders was twice off target for the home team and Ballack saw one shot blocked before firing another over the crossbar.
Werner missed a good chance to equalise early in the second half, turning on Axel Bellinghausen’s through-ball but dragging his shot across the face of goal.
Kiessling threatened with a superb solo effort, dribbling through the home defence before shooting narrowly over from the edge of the box.
The third goal arrived for Bayer in the 72nd minute when Gonzalo Castro found Sam and the home defence stood off him, allowing the former Germany Under-21 international to finish low and hard to Jentzsch’s right.
Derdiyok soon replaced Kiessling and got himself on the scoresheet within five minutes of his introduction, following up after his initial shot was saved to slot the ball past Jentzsch for the fourth goal.