Most menstrual cramps are not "in one's head."
Most menstrual cramps are IRL, and have a cause, and because the cause can be identified: a treatment.
But then apparently some gynos have come to see some cases of menstrual crams as psychogenic! It's the phenomenon of feeling menstrual cramps after the uterus has been removed.
To be sure there are those women post hysterectomy who feel "cramps" just like their former periods, but otherwise, again, most cramps have a cause.
Psychogenic dysmenorrhea is an actual diagnosis that is so obscure it appears in the billing codes, 306.52, but oddly doesn't appear in gynecologic text books. Psychogenic dysmenorrhea is apparently thinking you have menstrual cramps that you don't actually have. Dysmenorrhea, the actual disease, is a condition of painful menses.
Like many conditions with pain as their major symptom your physician takes your word for it, and doesn't question the validity of 'did you really have a cramp.' We know that actual menstrual cramps exist.
Researchers have documented physical contractions equivalent to the uterine contractions in labor, and know that blood flow is restricted to the uterine tissue during such a contraction. Ischemia to any body part is accompanied by pain. These we have a real physiological basis for the pain women feel from menstrual cramps.
It has been postulated that the inciting factor for IRL menstrual cramps for the contraction and cramping is due to the production of prostaglandins which are substances secreted in the lining tissue as it breaks down just prior to the actual bleeding of the menstrual period.