This is how Optimus and Twilight merge with Primus goes in Transformers Prime: Friendship is Magic: Beast Hunters: Predacons Rising.
[Optimus and Twilight look at each other and nod in agreement]
Optimus Prime: In order to both protect the Allspark and secure Unicron's defeat, it was necessary for me to empty the vessel's contents.
Bumblebee: Into where?
Optimus Prime: The Matrix of Leadership and Twilight's horn. As such, my own Spark can no longer be separated from the multitude of others within me. And the very same thing has happened to Twilight. And the reason why I brought Twilight with me was that I wanted to test her and see if she had the capabilities of a Prime.
Twilight Sparkle: That's why Optimus asked me to go.
Ratchet: Are you telling us that you and Twilight are now one with the Allspark?
Fluttershy: Is that true?
Smokescreen: That's what you say when someone kicks the....
Pinkie Pie: But...
Optimus Prime: To not return the Allspark to the well would be to prevent future generations of new life from existing on Cybertron. My quest must be completed with Twilight.
Twilight Sparkle: I agree with Optimus.
Ratchet: Optimus, I didn't return to save a life only to lose the one I care most about.
Fluttershy: And we can't lose you Twilight.
Bulkhead: Ratchet's restored planets. He'll find a way to save you and Twilight!
Applejack: And Fluttershy will help.
Arcee: We can turn to Vector Sigma, just like we did before.
Rainbow Dash: I'm with Cee on that.
Optimus Prime: Because the Matrix must now be relinquished with the Allspark, it cannot be restored or passed down to another. But while this may very well mark the end of the age of Primes, leadership can be earned with or without the Matrix, and, in my view... you have each acted as a Prime.
Knock Out: Well, I never really had the best role models.
Optimus Prime: As even Megatron has demonstrated on this day, every sentient being possesses the capacity for change. I ask only this of you, fellow Autobots keep fighting the noblest of fights.
Twilight Sparkle: And will you girls please promise to keep up working with friendship and harmony?
Bumblebee: You can count on us to keep the peace.
Rarity: I promise Twilight.
[Optimus and Twilight jump into Primus]
Optimus Prime: (voice) Above all do not lament our absence.
[The Allspark well glows]
Optimus Prime: (voice) For in my spark and Twilight's heart I know that this is not the end.
[Sparks start coming out]
Optimus Prime: (voice) But merely a new beginning.
[The ponies and Autobots watch as the dozens of sparks come out, including Twilight's heart and Optimus' Spark]
Optimus Prime: (voice) Simply put another transformation and friendship.
[We fade into outer space as the film ends]