"The Talk" and when to have it?

Au
I need some advice from other moms. At what age did you explain to your daughters about periods and sex?
I have insanely irregular periods, so when I do get them, they come with a evil vengeance! Today I had to apologize to my 6 year old, because I was woken up by labor-like cramps and I impatiently snapped at her because she decided today would be the morning she'd crawl up my ass and die. Okay, so not exactly, but I'm sure you catch my drift...These cramps are the worst I've experienced in years, the kind that makes you puke, the kind that reaches all the way down into your spine and pulls with what can only be best described as razer wire. 
So, I thought maybe it would be a good time to explain what exactly is going on with mommy's body so she can better understand. Sometimes I don't feel like, "Sorry for being grumpy. I love you..." really cuts it, ya know? 
But before blurting out the entire process of baby making and how your uterus throws a massive temper tantrum for not getting pregnant every month, I though maybe I should ask for some advice first. Ha.
Any advice from seasoned mothers out there? I could definitely use it.