We performed a thorough analysis of the star formation activity in the young massive galaxy cluster RXJ1257+4738 at z=0.866, with emphasis on the relationship between the local environment of the cluster galaxies and their star formation activity. We present an optical and IR study that benefited from the large amount of data available for this cluster, including new OSIRIS/GTC and Herschel imaging observations. Using a optical-to-NIR multi-wavelength catalogue, we measured photometric redshifts through a chi2 SED-fitting procedure. We implemented a reliable and carefully chosen cluster membership selection criterion including Monte Carlo simulations and derived a sample of 292 reliable cluster member galaxies for which we measured the following properties: optical colours, stellar masses, ages, ultraviolet luminosities and local densities. Using the MIPS 24um and Herschel data, we measured total IR luminosities and SFR. Of the sample of 292 cluster galaxies, 38 show FIR emission with an SFR between 0.5 and 45 Msun/yr. The spatial distribution of the FIR emitters within the cluster density map and the filament-like overdensities observed suggest that RXJ1257 is not virialised, but is in the process of assembly. The average star formation as a function of the cluster environment parametrised by the local density of galaxies does not show any clear trend. However, the fraction of SF galaxies unveils that the cluster intermediate-density regions is preferred for the SF activity to enhance, since we observe a significant increase of the FIR-emitter fraction in this environment. Focusing on the optically red SF galaxies, we can support the interpretation of this population as dusty red galaxies, since we observe an appreciable difference in their extinction compared with the blue population.