Why when I'm on my period i have really bad pains in the morning and then later i have coffee and I'm fine. Is coffee a good thing to drink on your period?

Liyah
I'm confuzoled