Maybe this will sound sort of outlandish. But if you are using a pillow, why does it need to be on the sleeping mat in the first place? Since you have a pillow, your head probably doesn't need the insulation from the ground. It also probably doesn't need the bit of extra padding. Thus if your pillow is placed just past the top of your sleep mat, it won't slide off since its already off. I admit to being a torso pad user, so perhaps my thinking is just too radical for normal people. :p
However, if you must have the pillow on your sleeping pad, fill your backpack with the rest of your gear you aren't using and place it at the top of your sleeping pad. The pillow will push against the pack and the much larger pack will push back against the cheeky bastard, thsu frustrating your pillows desire to roam free during the night. At least that was what I use to do.