Is there a way to change the axis of rotation of a bone in your armature?

I made a character in blender and some of the bones have a odd access of rotation that I would like to change if possible. Currently my foot, chest, and a few other bones have odd angles that make it hard to rotate them properly. I noticed that the axis on the UE4 mannequin’s foot was coplanar with the characters axis which seems desirable for my purposes. However I can’t find a way to change the axis of rotation in Blender, it seems like one of the axes must point in the direction of the bone. Does anyone know how UE4 managed to get their axis of rotation to be level? I’m trying to animate with Control Rig and the tilted axis of my character’s bones are somewhat problematic.