Menstrual cramps can be quite problematic for girls and women all over the world. A new analysis has found that what they eat may actually play a role in increasing or reducing the pain.

As part of the study, presented this week at the North American Menopause Society's (NAMS) annual meeting, an analysis was conducted to look at the connection between diet and menstrual pain (dysmenorrhea). Specifically, it focused on the impact of diet on menstrual pain and aimed to determine "which foods contribute to it and which can reduce it."

"Researching the effects of diet on menstrual pain started as a search to remedy the pain I personally experienced; I wanted to understand the science behind the association," study lead author Serah Sannoh said in a news release.

The analysis revealed diet may actually be a key player in increasing or reducing period pain. Foods known to cause inflammation, such as salt, sugar, meat, oil and coffee may contribute to increased period pain. On the other hand, diets rich in omega-3 fatty acids may help reduce it.

"A lot of the things that young people like to eat are are highly inflammatory...lunch meats, foods full of sugars and trans fats. But if you go on an anti-inflammatory diet — fruit, vegetables, olive oil, like the Mediterranean diet—you'll get less cramping," NAMS board member and associate professor at the University of Chicago, Dr. Monica Christmas, who was not involved in the study, told CNN.

Inflammation is a "key contributor" to menstrual pain. Those on a vegan diet were found to have the "lowest" inflammation rates.

Indeed, information about how diet and lifestyle modifications will reduce menstrual pain can be helpful for the many women and young girls who experience it. About 90% of adolescents experience period pain. In fact, it is said to be the "leading cause of school absences for adolescent girls."

With the issue of period poverty, for instance, many young girls end up having to skip school because they cannot afford period products such as pads, tampons and, of course, medication for cramps. But even among those who are able to take over-the-counter medications to relieve the pain, the positive results are "limited," noted NAMS.

The results of the study suggest that doing something as simple as modifying one's diet may help and provide the relief that many need.

"I am hopeful that this research can help those who menstruate reduce the pain they experience and shed light on the importance of holistic treatment options," Sannoh said.