With my son, he kept finding reasons he just HAD to get up. So I started covering each of his excuses as part of his bedtime ritual. He just HAS to have a drink of water. No problem, sippy cup on the bedside table. A few bedtime stories, of his choice, was also helpful. And then he claimed monsters were outside his window(on the second floor.lol) So, after getting everything else ready, but before final tuck in, I opened the blinds, looked every direction, said no monsters here, and tucked him in.
It helps to just be flexible enough to come up with an answer to whatever he tries. Also, make sure he's ready for it. We tried to change our son over to a big boy bed when he was two and a half. He was able to climb out of the crib, so we were worried. He loved the big bed....as a playspace. He would bounce on it, and all sorts of stuff, but NOT sleep. So we got frustrated, and took a side off the crib and put him back. He was good as gold. So then we ended up having to buy a toddler bed anyway. He just wasn't ready for THAT much space. It's just something to keep in mind.
Another thing you might consider is to put a baby gate at the bedroom door, if you are worried about nighttime wandering. Our son's room was at the top of the stairs, and had it's own entrance to the bathroom, so we were concerned about safety. But, we've heard from other parents that seeing the gate there seems to help keep the child in bed, too. We assume this is because the child knows that he can't go anywhere other than the bedroom, so he figures he might as well just stay in bed.