It's best to understand this as part of a much wider practice of "rhyming nicknames".
There was a trend of creating rhyming nicknames (arbitrarily changing the first letter) in the 13th and 14th centuries. That's where we get all these surprising forms like Dick (and Hick!) from Richard, Polly from Molly (for Mary), Bob, Dob and Hob from Rob (from Robert), Bill from Will (from William); and Hodge from Roger.
http://www.straightdope.com/mailbag/mdic…
In some cases the substituted letter has some relationship to the original. For example, the "P" of "Polly" and "Peggy" is phonetically akin to the "M" of "Molly" and "Maggie", etc. (Just try saying "Molly" as if you had a cold!) But in many cases the substitution is arbitrary. (Perhaps, though, there were favorite letters to use -- note all the uses of B,D and H as subsitutes for men's name in the list above.)
For other forms of "letter swapping" to create nicknames, and a variety of other methods by which English nicknames developed see:
http://www.geocities.com/edgarbook/names…
Apparently ONE impetus for all this letter swapping was a dislike among the native English for the harsh Norman French "r". (Note how many nicknames made substitions for r's -- not only at the beginning of words [Richard, Robert], but in the middle of them -- Mary > Molly, Sarah > Sally/Sadie, Dorothy > Dolly; Harold/Harry > Hal).
Another reason for rhyming nicknames was the limited number of different personal names at the time. Changing the first letter was one way of distinguishing people who had the same given name. (Consider especially the case of a parent and child with the same first name. Even today it is not unusual for the child to be called by a different nickname to distinguish them from their parent.)
http://www.behindthename.com/bb_gen/arcv…
Given this practice of letter-swapping (especially at the *beginning* of a name), it is not too surprising that the 'Ed' name (Edward, Edgar, Edwin) would end up using a nickname with various arbitrary consonants at the beginning, not only creating "Ned", but borrowing the pre-exising nickname "Ted" (for Theodore).