Take the iPad charger and remove the region-specific plug to expose the connector. (I've already removed mine on this pic)
You can buy a generic AC power cord from your nearest hardware/electrical store. These are very cheap or, you might find an unused AC power cable lying around.
A close up of the receptacle. These cables normally come with radios, camera battery chargers and the like. If the appliance comes with a removable AC cord, chances are, it would look like above.
Yet another view of the AC cord connector.
Simply connect the AC cord to the charger's receptacle. You don't have to worry about which way you connect it. Its perfectly safe any which way since you don't have to worry about polarity with AC.
Here it is connected to the charger. The AC cord is quite snug to the receptacle, but would come off should the cable be tugged at forcibly. Just reconnect if it does come off.
Voila! Extra cord length.
Here it is in action. You can now place the charger on top of your desk. This also allows you more leeway in handling your iPhone (or any device) while charging.
Btw, using the iPad charger with your iPhone (or any device which draws on USB power) is perfectly safe. Still, don't overcharge your device or you might experience a decline in battery performance.