Keep the door to the bedroom (mom's - where she's doing it) closed and keep Maggie out of the room. Find sometimes if they get into a bad habbit, preventing it from happening now is enough to stop it from happening again in the future. I would keep the door closed and Maggie out for a few weeks or more before trying to let her back in.
Simple and best solution! I would also spray that mattress with an enzyme cleaner just to rid it of the scent of urine. Don't want her to smell it months from now and start back up again.
Dogs sometimes will mark inanimate objects as if to claim them as their own. Beds seem to be a common object. I temporarily re-homed one of my dogs. The first night at his new home, a buddy came with his dog. this other dog has been in the house many times. Never an issue. Never marked anything. Well, within an hour in the house, the visiting dog went up and peed on the new owners bed. Why? I can only guess he was "marking" the one thing that smells most of the new owner and wanted my dog to get that "he was there first!"

Closed the door from then on and it never happened again and they were frequent play buddies. The second visit though, my dog made darn sure that the visiting dog knew it was his house now! He claimed his couch, his chair, his deck, his water bowl, and his new owner! LOL A shame it didn't work out for him and he is now permanently back in my home and with his pack - bottom tier of the totem pole again.