There are a few ways to do it depending on how you plan to use it.
You can, of course create a centered, perfect hexagon using a shape layer very easily. (Which you can then use as a Track Matte or many other things.)
If it needs to be an actual mask, you can choose the polygon mask shape (as if you were making a shape layer), but have the layer you want to mask selected. Start drawing your mask from the center, press the up arrow to get six sides instead of five, and finally, hold shift, alt, control, or any of the modifier keys while drawing it to help get the shape to behave how you want.
Also, you can create one in Illustrator and then copy and paste it as a mask.
Unfortunately there's noway to be certain that you're drawing from the exact center when you start dragging, even if you have placed guides at the exact center and have snapping to guides turned on it seems to be peculularly unreliable in terms of actually snapping to that as the origin point of the start of that centered creation of the mask.
I'm currently using one copied from Illustrator, but it's not ideal, as I have to paste that into a new layer and then use that layer as the mask (via the drop down menu that subjects a layer lower in the layer list to being masked by the layer directly above it) rather than have the mask in the layer that I'd like it to be in/on.
You can past Illustrator paths as masks onto your layer without resorting to track mattes.
Have you ever done this successfully, if so, how? I've tried following the instructions but always wind up with a new shape group, not a mask.
Simply copy the path in Illustrator into clipboard (Ctrl/Cmd + C), select your layer in AE comp and paste (Ctrl/Cmd + V).