While Dolorous Edd is a memorable character, and a great foil for Jon Snow, I'm pretty sure he was inspired by the character of Preserved Killick from Patrick O'Brian's naval novels. Here's what wikipedia has to say about Preserved Killick:
Preserved Killick is Aubrey's shrewish steward, inherited from Captain Allen when Aubrey assumes command of HM Sloop Sophie in Master and Commander. He also comes to unofficially care for Maturin (The Fortune of War, p. 57), particularly his long-suffering uniforms and clothes, and never resists the opportunity to nag either of them (though mostly Maturin, his habits generally leaving him looking much shabbier than Aubrey) for their carelessness in appearance. He is also known to listen in on their private conversations, steal from the captain's private stores, and drain more than his fair share of wine from the captain's table. Despite all these shortcomings, he is a highly valued, fiercely loyal and well-respected member of Aubrey's crew.
Killick complains all the time, generally expects the worst, and yet is steadfastly loyal. Since Martin is an avid reader of historical fiction, and O'Brian's works are some of the most famous and well-loved in the genre, I'd lay odds that's where Dolorous Ed came from.