the axon experiences hyperpolarisation when the voltage-gated potassium ion channels are left open 'too long', so 'too many' potassium ions leave.
when they finally close, the non-voltage-gated potassium ion channels are still open, so when the sodium-potassium pump does its thing potassium ions are moved into the axon, but they have a shallower concentration gradient to leave the axon, since loads of potassium ions were just moved out.
hope this helps cus it's kind of the blind leading the blind lol