I am just a hearing impaired enthusiast. So I will give an answer that I think is correct. Please, any better qualified Member should feel free to correct any of my mis-perceptions.
REM is conducted at the end of the fitting to confirm that the correct amplification for your audiogram prescription is actually heard in your ear canals. Adjustments are then made to enhance or reduce different frequencies to fit your hearing loss.
REM in essence corrects the receiver output to confirm and if necessary correct for different volume size and shape of your actual ear canals against the “standard ideal average model of an ear canal”.
To directly answer your question, yes, REM should be done immediately after fitting your hearing aids.
Look at Real Ear Measurement and Fitting by Doctor Cliff on youtube for a fuller explanation.