Hi Yusuke,
Both expressions describe a state of great happiness.
Example: He was over the moon/on top of the world about his victory and told me it would inspire him to go further.
"On top of the world" is used to describe one's great joy at achieving success or triumph in some endeavour.
Example: She was on top of the world after clinching the top award for her art pieces.