Why did my period get longer???

So last months’ period I masturbated on what should’ve been the last day. But after masturbating, my period lasted 3 days longer. (normally 5 days long) Now my period lasts 8 days long. Will it go back to normal if I stop masturbating??