Not uncommon, especially later on when plate armor got really really good. If you can’t cut through armor with your sword, then hitting someone really really hard at a single point and trying to buckle the armor or at the very least break some bones is a good idea.
But I do want to point out, warhammers are a lot smaller IRL than in fantasy genre works. Let’s take Robert Baratheon’s replica for example:

While this is very visually impressive, it’s highly impractical. That giant face distributes the force of a blow across a pretty wide area, which is the opposite of what you want. It’s also a two-handed weapon, which makes it even heavier than it needs to be, and makes it quite difficult to use from horseback.
Here’s what a real warhammer from medieval Europe looks like:

Not that different from something you might find in your toolbox, or at the very least in a climbing supply store. It’s got a small head, because you want to concentrate the force of the blow into as small an area as you can, and it’s also got a pick head as well, because once you’ve knocked your opponent down, it’s easier to try to puncture their armor and really cause some damage. And it’s one-handed, because you need the other hand free for reins, a shield, etc. And it’s not that heavy, so you can keep swinging it all day long.