THE SEA HAG was one of my attempts to write a commercially successful book that was different from anything I'd done before. The closest analog to my plan was The Dying Earth series by Jack Vance: a world in which magic works but the vestiges of ancient super-science remain also. (I hadn't read it at the time, but Vance's novelet The Miracle Workers is even closer to what I was trying to do than his Dying Earth stories.)
Though Vance gave me a model, I fashioned the action of The Sea Hag from fairy tales. Among the first books I read by myself were the Color Fairy Books edited by Alexander Lang. I reread several of them while I was plotting my novel as well as reading Alan Garner's recent (and brilliant) collections, but most of the tales I used were from the Pantheon collection Russian Fairy Tales.
The reason I turned to folktales was the same one that caused me to model Cross the Stars on The Odyssey: literature that's survived for thousands of years must resonate below the conscious level of the human psyche. I wanted to tap that power for my own writing.
A folktale hero generally has a sidekick who acts as mentor and provides help at crucial junctures. Rather than a talking crow or cat, I gave my hero a non-anthropoid robot (whom I named Chester after a beloved dog who'd come to a bad end). There was no conscious connection with R2-D2 of Star Wars; I think in fact it was a matter of convergent evolution.
I made Chester a sententious, half-humorous character like those of the westerns of my childhood--the Gabby Hayes/Andy Devine variety of sidekick. (I don't say this was a good idea; it's what I did.)
On whim, and because I was capable of doing it, Chester's aphorisms come from Wisdom Literature. (I don't say that was a good idea either.) Most cultures have such collections; the most familiar to somebody raised in the Judeo-Christian tradition is the Book of Proverbs, but (for instance) one lay of the Elder Edda contains the wisdom Odin gained when he hung for three days on the tree. (An example of this Viking wisdom: 'Don't bandy words with a poor man in Parliament; just draw your sword and cut him down.') Chester's wisdom is Egyptian, from the 2nd millennium BC.
The Sea Hag wasn't Jim Baen's sort of book but he got behind it with a will. The result wasn't a disaster, but it certainly wasn't the commercial success I'd been trying for. A space opera written from my outline came out in the same list and outsold my solo novel both in absolute terms and in percentage of sell-through.
The funny thing, though, is that there are people who like The Sea Hag better than anything else I've written (and indeed, like the book when they don't like anything else I've written). The kinship to The Dying Earth was closer than I'd intended: both are cult classics, but neither has been a lot of help with the writer's mortgage.
Well, back to the drawing board. I never again attempted to use fairy tales directly in a book I hoped would have broad appeal (I consciously wrote Old Nathan for a limited audience).
But that doesn't mean I gave up on my basic intention. I used the tropes of fairy tales in my Isles series, but here I melded them into the structure of heroic fantasy in the Tolkien/Robert E Howard tradition. This time the commercial result was very good indeed. Will I go back to the World of Crystal Walls? Probably not. But you see, I never really left it.