when you want depends how you feel
Id at least give the incision time to close, but past that, i believe its fine whenever you want.
I’d give it at least 6 weeks because you can’t see the wound inside you even if the outer layers are healed. When you orgasm, the womb contracts and that might cause further pain or discomfort.
I'd say straight away / when you don't feel as sore to reach down (guessing you're freshly postpartum?) X
You should wait at least the 6 weeks. Most people think this is just for penetration but it's not, there are risks with masturbation too as when you orgasm the uterus contracts which can be very painful and can even rupture internal stitches. It's your choice of course but they're the risks of not waiting the 6 weeks to heal internally first.
Whenever you feel comfortable to do so