I've done this before and if I remember correctly you need to send a written letter to Apple Care explaining that you want the Apple Care warranty for the Mac with serial number xxxxxxxx transferred to <Insert New Owner's Name>.
Take a look in the Apple Care terms and conditions in the Apple Care box that came with your Mac for the details. The details are also probably on the Apple website.
naah.... you don't have to write a letter... just call the applecare number and ask if you could do it but make sure you have the serial numbers (i did this already)