Since it went away by itself, I would check, if sensor wires (end stop switches, temp sensor wires)and the hot end wires overlap. Maybe the current in the hot end wires causes some kind of interference with sensor signals.