Around 1519 King Henry VIII decided Majesty should become the style of the sovereign of England. "Majesty", however, was not used exclusively; it arbitrarily alternated with both "Highness" and "Grace", even in official documents. For example, one legal judgment issued by Henry VIII uses all three indiscriminately; Article 15 begins with "the Kinges Highness hath ordered," Article 16 with "the Kinges Majestie" and Article 17 with "the Kinges Grace."
In pre-Union Scotland Sovereigns were only addressed as Your Grace.
During the reign of James VI of Scotland and I of England and Ireland, however, James made Majesty the official title, to the exclusion of others.
The style "His/Her Most Excellent Majesty" is used solely for a present or past reigning monarch. The style "Her Most Gracious Majesty" is used for a queen consort, queen mother, or dowager queen.