Updated

OK, let's start with the obvious: yes, the main thing your PMS is telling you is that your period is on the way. But it's not the only message encoded in those yucky premenstrual feelings. If you notice your PMS is particularly unpleasant, there may be a deeper message in the symptoms. First, take heart: if you experience difficult PMS, you can take several measures to prevent it—or at least prevent it from getting worse. (And you should: women who don't treat hormonal imbalances like the ones often behind PMS are more likely to experience problems like heart disease and diabetes, according to the BioCycle study. So if you can learn to crack the code of your PMS, you can treat the symptoms and their root causes at the same time.

Of note: PMS isn't necessarily a cause for concern, according to Sherry Ross, MD, OB/GYN and Women's Health Expert at Providence Saint John’s Health Center. It can be a normal result of hormonal fluctuations that occur over the course of your cycle. But even perfectly healthy women can reduce the effect PMS by improving their health.

Here's what the most common issues that crop up before your period might mean—and how to rectify them.

Mood swings

More From Glamour

1. You're already stressed.
One of the best predictors of your mood before your period is your mood during the rest of the month, says Ross. "Women who are more stressed, depressed, anxious, or who have weight fluctuations can be more susceptible to experiencing a more dramatic PMS." If severe emotional symptoms continue after your period begins or start more than two weeks before it, they could point toward a clinical condition like depression or anxiety that warrants professional help.

2. You're not getting enough calcium.
Inadequate nutrition can also contribute to mood swings. One studyfound that women who took calcium supplements experienced less premenstrual depression and fatigue. Upping your calcium intake through supplements or foods like sesame seeds, sardines, and salmon—since dairy exacerbates PMS for some women—can also help headaches, says functional nutritionist and holistic health counselor Alisa Vitti.

3. You're short on vitamin B6.
Vitamin B6 can increase your progesterone levels and decrease estrogen production, which helps with mood swings, fatigue, and possibly cramps. Vitti recommends getting it from turkey and/or sunflower seeds.

4. You're sedentary.
Exercise plays a huge role in curbing stress, so although you might feel sluggish before your period, it's more important than ever to get moving. If you're looking for a less intense activity that also alleviates your cramps, yoga is a great option.

5. You're psyching yourself out.
It's a self-perpetuating cycle: if you're dreading your time of the month, you end up with a poor mood before your period, says Ross. In this case, being proactive about diet, exercise, and mental health can give you some relief.

Cramps

1. You're still not getting enough calcium.
This one again! In addition to mood swings, calcium deficiency can also worsen cramps. Ross recommends getting at least 1000 milligrams per day to lessen the pain.

2. You're drinking a lot of alcohol.
Since booze dehydrates you and decreases your magnesium levels, excessive alcohol consumption can exacerbate period cramps and breast tenderness.

Bloating

1. You're dehydrated.
Ironically, your body retains more water when you're not consuming enough, says Ross. Make sure to drink two to three liters of water a day and eat hydrating foods like berries, watermelon, cucumber, celery, and lettuce. Green tea can also help prevent bloating.

2. You're overdoing it on the junk food.
Overconsumption of salt and sugar can also contribute to bloating, says Ross. Keep them to a minimum during your pre-period time.

3. You're eating foods that make you gassy.
If bloating is a major issue for you, you may want to try cutting down on beans, Brussels sprouts, cabbage, broccoli, cauliflower, apples, and other foods known to cause gas. Lean proteins like fish and chicken, or whole grains, can help prevent this.

4. You're not getting enough magnesium.
Magnesium keeps your electrolytes in balance, so when you don't get enough, you retain water, explains Vitti. You can get magnesium from cooked leafy greens or—as those with premenstrual sweet cravings will be happy to hear—dark chocolate.

In general, the key nutritional remedies for PMS problems are calcium, magnesium, and B6, says Vitti. And exercise and adequate hydration help with pretty much everything. A lot of these habits are helpful all month round, but you might find the effects of overlooking them especially bad right before your period.