When the Duke of Bragança ascended to the portuguese throne as D.João IV in 1640, the spanish, naturally, were not happy with the situation, and Felipe IV continued to style himself as king of Portugal.
So there were simultaneously D.João IV (1640-56) and Felipe IV (1640-56)
D.Afonso VI (1656-65) and Felipe IV (1656-65) and
D.Afonso VI (1665-68) and Carlos II (1665-68) when Spain finally regognized Portugal's independence.
After the death of King D.João VI, Emperor D.Pedro I of Brazil was recognized as King D.Pedro IV of Portugal.
He abdicated in favour of his daughter D.Maria II da Glória who was supposed to marry her uncle D.Miguel.
Later D.Miguel took the throne and reigned from 1828 to 1834 when D.Pedro's armies defeated him.
D.Miguel I was cohearsed to abdicate but maintained his royal style.
From 1834 to 1853 there were D.Miguel I, D.Maria II and even king-consorte D.Fernando II.
From 1853 to 1861, D.Miguel I, D.Pedro V and his father D.Fernando II.
From 1861 to 1866, D.Miguel I, D.Luis I and D.Fernando II.
From 1866 to 1885, D.Luis I and D.Fernando II
In the 16th century the House of Habsburg had:
1. Charles V Holy Roman emperor and King of Spain
2. Ferdinand King of Hungary and Bohemia (brother of 1 and his successor as Holy Roman Emperor)
3. Phillip King of Napels and king-consort of England (oldest son of 1 and his successor in Spain, Italy and the Low Countries)
A generation later the Habsburg had three reigning branches as well:
1 Spain and Portugal Phillp III
2 Holy Roman Emperor Rudolph II
3 Joint sovereigns of the Habsburg Netherlands Albert and Isabella.
When the marriage of Albert and Isabella remained childless and he died the lands returned to her younger half brother Philip III and she acted as his regent in them.
It has struck me that between 1848 and 1867, the house of Wittelsbach actually had TRHEE men styled with the title of King with the qualification of Majesty. From the abdication in 1848 of Ludwig I to the death in 1864 of Maximilian II, one had HM King Ludwig I of Bavaria, HM The King of Bavaria (i.e. Maximilian II), and HM King Otto of Greece (until deposed in 1862, he was styled as HM The King of the Hellenes).
Then, between the death in 1864 of Maximilian II to the death in 1867 of Otto, one had HM King Ludwig I of Bavaria, HM The King of Bavaria (i.e. Ludwig II), and HM King Otto of Greece.
Have there been other periods in royal history where one had more than two men of the same house styled with the title of King? The only other example I can think of would be in the family of King Christian IX of Denmark (the so-called "Father-in-law of Europe"). In 1863, his second son, Prince William, got elected to start a new Greek royal dynasty, after the afore-mentioned House of Wittelsbach got deposed. He became King George I of Greece on the occasion.
Later on, the house of Glücksburg branched further out, when in 1905 Norway ended her personal union with Sweden and invited Prince Carl of Denmark (second son of the future King Frederik VIII) to become her first king. He thus became King Haakon VII.
So between 1905 and 1906, one had HM King Christian IX of Denmark, HM King George I of the Hellenes, and HM King Haakon VII of Norway sitting on royal thrones.
The house of Coburg might also count, since Prince Ferdinand of Saxe-Coburg and Gotha (Kohary) received the title of King Consort of Portugal after marrying Queen Maria II and fathering sons. And of course the said sons and grandsons through them were kings of the house of Coburg (as well as Braganza). Since this house also reigned in Belgium and Bulgaria, this might also count. The trouble is that Bulgaria was originally a principality, and got elevated to a kingdom only in 1908. But as of then, the Coburgs were still reigning in Portugal (although that situation would soon change), as in Belgium.
Are there other examples? I don't care whether the men in question were enthroned or not: even abdicated kings continue to be styled with their exalted titles (as in presently the case in both Spain and Belgium).