Hi,
This sounds very much like peri menopause to me. I (48y) have consulted my GP surgery over the past few months regarding menopause and it is astonishing how many GPs "expect" women to go through this exactly at the average age of 51 years or something. Mine thinks I am too young but hormonal tests (FSH, Oestrogen) point to late peri for me (even though hormones can fluctuate during peri). Irregular periods in particular when they have been regular before should give any GP a hint to consider peri menopause as a cause. My symptoms picked up really earlier this year when I had a gap between periods of nearly 4 months, never had such a gap before. I learnt most of what was relevant for me for peri from this forum and some good books and talking to friends now in similar situations but not from GP surgery. I had dozens of symptoms I never had before in the past few months but luckily they seem to calm down now, and one thing that has helped me is a low dose of magnesium and regular exercise, and, sadly (I like coffee) cutting down heavily on caffeine intake. You may need to basically find what works for you to have a decent quality of life during this phase. I have so far not opted for HRT yet but keep it in mind as an option if I am mistaken about my symptoms calming down.
All the best, Anna