After 50 years of research, eminent Stanford University sleep researcher William Dement reportedly said the only solid explanation he knows for why we sleep is “because we get sleepy”.
https://theconversation.com/what-position-should-i-sleep-in-and-is-there-a-right-way-to-sleep-189873