Yes, of course! Any sort of exercise, meditation, or stress-relieving activity will work to expel pent-up energy, depending on your pokémon’s typing, abilities, and interests. Think of it like releasing pent-up steam as a human. Some people do so by boxing, sparring, fighting, or engaging in rigorous physical activity. Others prefer more quiet pursuits.
Try asking your kirlia what he would like to do if you hadn’t already gotten an idea during his time as a ralts. Perhaps introduce him to art or put him on an ordinary exercise routine. Maybe even engage in meditation along with him. Try a number of different possibilities until you find the one that works best for your kirlia.
Best of luck, anonymous, and congratulations on your recent evolution!