Cushy sounds like a cushion, but its roots are in Persian, and it reached English in soldiers' kitbags.
Merriam-Webster traces cushy to Hindi and Urdu khush, from Persian khush. The New World magazine points to the Persian noun xushi, "pleasure, convenience." The New World says it came into English through Indian Army slang, with an English ending added.
The word is older than the trenches. Merriam-Webster gives a first known use of 1895. The blog Not One-Off Britishisms quotes the OED's first citation, from the Penny Illustrated Paper that year: "He told me that I had got into a 'cushy' (easy) troop." The blog also quotes Green's Dictionary of Slang for "rare cushy jobs" in 1912.
The First World War made the word famous. The OED, as quoted on that blog, cites a 1915 line: "When you are in the trenches a cushy wound..seems the most desirable thing in the world." It defines a cushy wound as one serious enough to take a soldier off active duty, but not life-threatening. The OUP blog glosses the broader sense as "undemanding, easy, or secure."
Soldiers had another word for such a wound. A "Blighty," says The New World, was a wound serious enough to get a soldier shipped back to hospital in England. The OUP blog traces Blighty to Hindustani bilayati, "foreign" or "European," and dates it in print to 1915.
The cushion connection is not quite nothing. Not One-Off Britishisms reports that the OED suggests English cushion or "cushiony" may have helped shape the word, even though its source is Persian.
From the army, cushy spread into civilian talk about jobs. A 1918 New York Times piece reported British agitation against holders of "cushy jobs." The blog finds the earliest American example in 1947, in Budd Schulberg's The Harder They Fall. American use climbed in the 1970s and overtook British use in the 1990s, by Google Ngram's count.