Haven't done it myself, but I'm told they're a direct swap. Someone better informed will chip in sooner or later. Of course, you'll have to swap the older intake manifold onto the newer head. I wasn't aware of cam differences. Is it possible that the E36 head was warmed up with aftermarket cams?
The later M42 head has narrower valve stems, so it's an improvement as well.