In my experience of four 500MHz iMacs (two Indigo and two Snow, from 2001, 2002 and 2000 respectively), this is a common phenomenon with the soft-silicone-clad multicolour cables. The cladding flows readily enough, especially when warm, to allow random misfit between mains-cable socket and the iMac's recessed plug. Solution? Replace the misfit with a cable bearing a conventional almost-rigid IEC C13 socket at the iMac end.
de