We have studied the change of the interlayer exchange coupling between the adjacent magnetic transition metal (TM) layers across a rare-earth metal (REM) layer by hydrogenation in TM (10 nm)/REM (t nm)/TM (10 nm) trilayers composed of Fe and Co as the TM and Y as the REM. In the case of the Fe as TM, the magnetic properties are sensitive to hydrogenation. In particular, the interlayer exchange coupling changes remarkably by hydrogenation. On the other hand, in the case of the Co as TM, the magnetic properties do not change by hydrogenation, and the change of the coupling by hydrogenation cannot be confirmed. The difference of the change of the coupling by hydrogenation between TM=Fe and TM=Co should be attributed to the difference of the TM/Y interface state.