It's ma'am as in ham, not ma'am as in farm. Lower class people, or domestic servants would say "mum" when referring to their employers, but that hasn't been the case for about 100 years. I suppose some regional accents could pronounce "ma'am" as "mum" but I'm struggling to think which. Cockney, perhaps. These days, mum is what we call our mothers. It's not got anything to do with the Queen.