Coffee against menstrual pain

I suffer from severe menstrual pain and since I do not always want to throw in the morning a painkiller, I drink a cup of black coffee. I actually have this tip from my mother and from my gynecologist, and I even have confirmation that this is true and not just a placebo effect.

The caffeine is probably antispasmodic and it also supports the painkiller in their function, because sometimes the pain is so strong that coffee alone does not help.