To understand this, you need to understand Jafar, and I understand Jafar. After all, I've seen this move well over a thousand times.
His entire life, up until this point, was a carefully crafted charade designed to hide his true nature and protect it until he was able to achieve ultimate power.
When he becomes the actual Most Powerful Sorcerer in the World, guaranteed by a fucking Genie, he spends his time throwing a gigantic "You Fucking DID IT Jafar" party. He starts to indulge in every, and I mean EVERY whim he has, finally relaxing after decades upon decades of restraint.
The reason he starts making all those puns? Because he had the smallest urge to, and no longer had any sense of self restraint or of his actions having consequences that could actually cause him harm.
Incidentally, this is also why he turned himself into a gigantic snake.
My advice to all future Jafars? When you achieve ultimate power, go somewhere far away from everyone and just sit quietly and stare at the sky for a very long time. Really digest what you've accomplished, and what you want to do next. Jafar was undone because he didn't have a plan for after he achieved unlimited magical might, or if he did have a plan, it completely unraveled the moment he got what he wanted.
I'm really surprised he didn't just rape Jasmine though. I guess that even in his hyper compulsive state, he still found that bitch repulsive. Fucking Hilarious.