I don't own an SD9, but I do know that some weapons are notorious for accidental release of the mag. However, all the ones I've ever heard of before happen while firing. My suggestion would be to see if you can make it happen again by just hangin' out on the couch or whatever. It might be a mag-release button getting engaged somehow, but it might be an internal weak catch, where it appears to seat well, but could cut the mag loose unexpectedly. Or it could have been just a freak position you got into that did put pressure on the release button, and it might not ever happen again. You're certainly right to be concerned. If you can duplicate the occurrence, or at least if I could, the gun would have to go back. Good luck.
ETA: I carry nothing but semi-autos, and I have never had what you describe happen to me (except one time at the range while shooting - can't remember which gun it was, but it was either a Kel-Tec PF9 or a CZ RAMI). I've been carrying for the better part of 30 years, so in my experience, no, it is not common at all to have a magazine escape from a holstered weapon.