I was gonna say "tune up". The big flag was "when it's hot" because the ignition becomes less efficient with heat, and that's when bad plug wires turn to doo doo.
You probably closed the spark gap in the distributor with the new parts enough to overcome the resistance, but if you have any more trouble with it, replace the wires because resistance directly affects the longevity of the cap and rotor. If the inside of the old cap has a rusty looking brown powder in it, the wires are bad or your old plug's gap was too wide.