Macros in vim are just registers, i.e. the same ones used for copy & paste. So,
to edit one (e.g. one recorded with "qx"):

paste it:

"xp

make changes, then re-select it (recommend using visual mode, to avoid yanking the end-of-line
character), and put it back in the register:

"xy