Common sense for adults, children, and babies alike is that after intense and exciting activities the body and the brain needs some time to quiet down. Think of yourself: maybe you had guests over, laughed, and had a good time. Can you fall asleep 5 minutes after the guests leave (the time to put on your pajamas)? Or do you maybe make yourself a good-night tea, turn off some lights, read a few pages from a book, and then try to fall asleep?
While it is of course true that it's good for kids to burn their energy throughout the day, right before bedtime it is usually recommended to have a consistent, predictable routine that will help them lower their energy level and transition towards sleep. This routine can be 15-30 minutes long, and may start with lowering the lights, then taking a bath, moving from the livingroom/playroom to the bedroom, reading one or two stories, etc.
I have a 15 months old, and our bedtime routine has changed as she grew (for example it now also includes brushing her teeth). Whatever happens and wherever we may be, we never skip a some the steps, most importantly the good-night story. Usually it takes her around 45 minutes from when we say stop to the playing until she is sound asleep.