We went through this about a month ago, he just needed to grow out of it, basically, as it was a time of SA for mommy. He just couldn't handle the sight of me leaving!!
So I had to change up his bedtime routine a little, we do what I call the night night routine. I will sit with him for a few minutes and say bye bye, night night, to just about every person/word that means anything to him, and I walk him over to the crib, all while saying night night. I say bye bye mommy, night night. Then give him about a dozen kisses and say night night, and he understand that now it is time for him to go to sleep. He even says night night back to me! Now he looks forward to the routine, gives me names to say good night to.
Just sharing because we found this worked wonderfully for us! He just needed a little more closure and cuddles from me at the end of the night. And things are back to normal, he just needed his mommy "cup" topped off before I left the room!