Can I withdrawal from my IRA if I’m pregnant and be tax free?

I was reading that you can pull up to 5000 and not be penalized for a birth. Could I do it before hand to help cover medical cost now?