The e60 M5 wheels & tyres are quite wide—255/40z19 front and 285/35z19 rear—so you'd probably have to change the tyres as a minimum to something like 235/35z19 front and 265/30z19 rear.
However even then, the offset for e60 M5 wheels is et12 from and et28 rear (for 8.5 and 9.5 wide wheels respectively), whereas a non-M Z4 offset is between et47 and et50 (depending on wheels fitted). Which means the M5 wheels will stick out 4cm and 3cm further than the Z4 wheels.
Too wide IMHO, ignore the good price and get a decent 8,5 (225/40/19) front and 9,5 (255/35/19) (MAXIMUM) rear setup and youll be just fine. If you go too wide the car will be lazy and wont drift around corners