I was watching History Buffs episode on Game of Thrones where many parallels were drawn between actual historical references and what Geroge R. R. Martin wrote in Game of thrones. For example, Hadrian's wall, Colossas of Rhodes etc.
Does Tolkien take inspiration from actual history as well?
Not directly, I think. If you read Humphrey Carpenter's biography of Tolkien, he makes the case (IIRC) that Tolkien took inspiration from his own experience of war (he fought in the trenches in WWI), and used that to colour his depictions of deep friendships forged in adversity (the Fellowship of the Ring, for instance).
Tolkien was a philologist at heart, rather than a historian, and that's one of the keys to understanding his work, I think. He didn't start with the stories - he started with the languages, and the stories grew from there. If you look at the languages he invented, they have similarities to existing languages. So Sindarin is kind of like Welsh (in sound, at least), and Dwarvish has elements of Hebrew. That in turn impacts on the people he imagined to speak those languages: the Elves are "Celtic", in the sense given to the word by Matthew Arnold (see his essay, "The Study of Celtic Literature", 1891), of poetic, nostalgic, Other. The Dwarves in contrast have the secrecy, the exclusivity, if you like, of Orthodox Judaism.
The other key to understanding him is through stories. Tolkien took direct inspiration from other works of literature - notably, the Nibelungenlied/Volsunga saga material that deals with Sigurd, Fafnir's treasure, the cursed ring, and the concealing helmet of the dwarves (note that Tolkien takes the cursed ring and gives it the concealing properties of the helmet). If you look at The Silmarillion, there's an Atlantis story, but his main source of inspiration was Norse and Germanic literatures.
So to answer your question, no, I think Tolkien didn't take direct inspiration from history the way George R. R. Martin has.
This answer will be slightly off topic because it digs into Tolkien's own views on this as well as the non-historical sources he drew inspiration from, but I think it will help you understand Tolkien's style and beliefs.
Almost as old are the books are interpretations of its meaning. Mordor, many believe, is an allegory to industry, and Tolkien as both a veteran of WW1 as well as a passionate scholar of the early middle ages as someone who both loved the simpler times and had reasons to fear modernity.
There is one big problem with this theory, however: Tolkien himself. He said in the opening of the second edition of the series:
“I cordially dislike allegory in all its manifestations, and always have done so since I grew old and wary enough to detect its presence. I much prefer history – true or feigned– with its varied applicability to the thought and experience of readers. I think that many confuse applicability with allegory, but the one resides in the freedom of the reader, and the other in the purposed domination of the author.”
This passage reflects a common philosophy of Tolkien, which is that in order for a world to feel alive it must be its own being, not a skin wrapped around other tales or real history. For example, he created the history of the world of Middle Earth partly because he wanted to create his own language, Elvish, and he knew a language can't just be created, it evolves and changes with the world and people that speak it.
Of course, just because he disliked allegories doesn't mean he didn't use them. In several of his letters he wrote about his frustrations with them, as he found that it was often difficult to explain a foreign concept to a reader without using them, and he admits that subconsciously all good writers will make them as a consequence of reality and good world building converging together.
So did he take inspiration from history? Of course he did. He based his setting on a somewhat romanticized version of Anglo-Saxon England, Elvish was based in part on French, and he drew on many Norse fairy tales to populate his world. He was a devout Christain, so many of his beliefs on good and evil seeped into his stories, just like his close friend C. S. Lewis did, although Lewis was much more direct with his stories, with clear and intentional similarities between his characters and those from the Bible, most famously Aslan being based on Jesus.
In the end, no matter how much he tried to deny it when he was alive even those close to him looked for his real world influences, so in short, he did have historical influences, but to what extent is really up to your own interpretation.
Sources:
The Letters of J.R.R. Tolkien
Foward to the second edition of Lord of the Rings