Lay and Lie are two words that can easily trip a person up, even if that person had been speaking English all their life. I think I may have cracked the code, and have created a small graphic to help keep things straight.
This, like anything with language, is not a hard and fast rule, there is a certain amount of flexibility to all living languages and English is replete with flexibility. Another great resource is Merriam-Webster’s article on using this pair of words. If there are any other word nerds out there who would like to weigh in, please do so.