RIP doesn't make sense from any religion's point of view or even atheists for that matter. What does it even mean?! Are they wishing the body to stay under or the soul to go to sleep? Or are they wishing the soul to be in peace without taking on ghostly forms and wandering about?
All religions believe in some sort of Life after death, either reincarnation or heaven or hell or whatever. So RIP is quite irrelevant. We can wish them a Good After Life (GAL) perhaps.
It doesn't mean 'rest' in the sense of sleep. It means they are in a place of rest rather than toil. It's about the afterlife for some being 'restful' rather than a vale of tears.
As the phrase became more common, for those religions that believe in bodily resurrection, then it also was about the body being at rest until the day of the final resurrection.
It is to some extent a pabulum phrase now, trotted out by instinct but since at times of death words are difficult, if people use the phrase after I am dead, I will be beyond caring.
Anyway, talking about this has brought to mind the Dave Allen story,see link below, from 2.22 in (Although since it is Dave Allen just watch the clip)
https://www.youtube.com/watch?v=THiV_Wa3Lz4&feature=youtu.be