Doesn't work. I just figured I'd post up here in case anyone else had the same idea. I was able to do this once on a Focus -- these overhead consoles typically just clip to the headliner, and as long as the contour is similar they can interchange. I picked up a Mazda6 console and decided to give it a shot. It looks like this:
The dome light portion is dimensionally identical to the Mazda3/Mazda5 unit, but it has a natural taper to it towards the windshield. Since the sunglass holder sits in front of the dome light, it continues the taper to the point where it's too small to cover the hole that would be left by the stock dome light. It could probably be made to work if you weren't too picky, or if you turned it around and got your sunglasses out backwards, but I didn't want to jank up my headliner. I've officially ditched this idea.
Bummer, I know.