The "Legion" Netflix series was based on the Legion character from the Marvel comics universe, the "X-Men" and "New Mutants" comic book series. The comic or the show could have been influenced by the book you suggest, but the direct line is from the comic books.
Well yes of course it's a Marvel character... I meant the way they tackled it. It's as if they crossed the two plots - a common script hack. The hero, his absurd childhood, his psychiatric experience, his schizophrenia, the girl he meets in the ward & falls in love with, his continuous search for her, and this crazy Alien Force (Farouk in Legion, Kmôhoûn in the novel) living off him like a parasite...