I can relate to you so well as we went through a phase of the same thing! Every child is different, but what worked best for us was to come up with a very specific bedtime process and stuck to it every night until the ping pong routine finally stopped. We allowed him to help us come up with the routine so that it was something he looked forward to doing and it eased him into to sleepy mode. Here's the routine that worked for us, but you'll have to find what works best for you. Granted, ours was three when we tried this routine and found success.
7:30 - bath time followed by getting ready for bed
Dim the lights (this was a HUGE help because it helped to start soothing him as we went about his routine. Try to avoid bright lights from this stage of the process forward so that the soothing continues)
Watch and sing three Veggie Tale Songs with a sing along DVD (still in a somewhat dimly lit environment)
Read two books (keep a deep soothing voice while reading them if possible)
Give our dogs hugs and kisses goodnight
Up to bed to be tucked in and say our goonight prayer
Rub his back for a couple of minutes and with a very soft soothing voice would remind him that I love him very much, that I'll be just in the other room and for him to stay in bed. With him still awake in bed (though at times he's so relaxed by this point he'll fall asleep before I walk out) I very quitely exit the room.
He was in bed by 8:30 at the latest with this routine. After a week of this, we began to see a real improvement with his wanting to get up out of bed. When he did, I would stay very calm and relaxed and just put him back in bed, cover him with his blanket, and calmly walk back out without saying anything. It's important to not allow yourself to get frustrated as they pick up on it and feed off of it.
Another thing is that around 2.5 is when our little one became afraid of the dark so we put in a very faint nightlight. If you haven't tried this already, it's worth giving a try as he may be getting up because he's afraid of the dark. You might also try cracking his door so that he can stay in bed but still hear that you are present in the house.
Best of luck to you as I know it can be a very difficult process to figure out! But it is so worth figuring out what works as you all get a much better and peaceful nights rest! Feel free to reach out to me as I can definitely share more information or explain why we wound up with the schedule referenced above. It's been such a gem since we discovered it!