Masturbating

Is it safe postpartum or you have to wait 6 weeks just like with sex?