V.W.
You are doing the right thing already. Walk him back (don't carry him) and keep any speaking to an absolute minimum. He will stop in time.
Try to look at it from another perspective: Be glad that when he gets out of bed at 3:00 am he comes to you, instead of sleepwalking out the back door, or helping himself to snacks in the kitchen. There are kids who do those things, too, and that is scary.
It is a phase he is probably going through and it will get better. Just keep doing what you're doing... walking him back to bed. Each of my kids (FABULOUS sleepers from the get go) went thru a phase where they would get out of bed and come to the side of my bed. It was short lived, but they both did this. One did it around 3 yrs old, the other did it closer to 5.
Just give it a little time. I don't think you need to resort to locking him in his room or anything drastic... he comes to YOU. He's not roaming the house...