Al-jawab billahi at-taufeeq (the answer with Allah's guidance)
Any self-stimulation, will not be permitted, and considered to be masturbation.
However, If the means of stimulation is one�s spouse�s body i.e, wife masturbating the husband and vice versa, this falls in the category of foreplay which is permissible between the husband and wife.