This is definitely more of an /r/AskAnthropology question, but I'll take a stab at it. Apologies for not having great references handy. The Smithsonian article at the end links to a few studies looking at related questions.
There isn't a recognized 'inventor of the pillow', nor really any record of a society being the first to use pillows. That's because we almost certainly used some sort of head support during sleep since before we differentiated from other great ape species.
With the exception of Great Apes, most large primates sleep on tree branches, balancing upright in some way. Great Apes, however, are unique as the only kind of primates to build sleeping areas/platforms and every species of Great Ape we've studied does this.
Comparing their sleeping patterns, Great Apes sleep deeper and get much more NREM sleep than other primates. It's believed that this difference was correlated with increased brain development and it's likely we wouldn't have evolved to be homo sapiens if our ancestors had not developed platform sleeping.
Once we're sleeping horizontally, we end up needing head/neck support. You can observe this in natural sleeping positions even without a pillow - a hand or arm is generally tucked under the head. From there it's a very small step to prop some object under the head than the arm you've been using and that's likely what we did.
https://www.smithsonianmag.com/smart-news/learn-secrets-apes-sleeping-habits-180955021/
Isn't this better suited for /r/AskAnthropology?