This is a question I have been asked 1001 times and my answer is the same yesterday, today and forever until I see a change in the curriculum of universities.
Your choice will depend on what you are trying to achieve.
My answer is based in what I believe most employers want to see when hiring for a role- which is, value that can easily translate to the job and the work place.
If your aim is to gain professional expertise that gives you an edge and can translate to immediate value for the employer, a professional certification is a better option. Specifically, I am referring to internationally recognised curriculums that have been developed from tested bodies of knowledge, on-going research and thought leadership.
If your plan is to develop academically or interested in research, by all means, get a Masters degree in HR as it may be a prerequisite for an MPhil or PHD.
If it is simply your desire to get a higher degree anyway, my personal opinion is that you are better off getting an MBA or something in a completely different but interesting field that will give you more rounded or cutting edge competence in the work place.
Do note, a master’s degree does not replace professional certification, so you should still get certified regardless of whether you pursue a postgraduate degree or not.
As a professional, even with years of experience, you need to validate your professional status by allowing yourself to be examined and certified by an independent certification awarding body. It sets you apart.