The way I usually hear this story, Wilhelm found Saladin’s old medieval wooden tomb, and he paid for a more respectable marble mausoleum.
This is part of a long legacy of stories where Europeans always recognized Saladin’s greatness but the Arabs/Turks/Muslims in general were a bunch of uncultured barbarians who couldn’t even build him a proper tomb. Lots of orientalism and western gaze going on here. But actually, the Ottoman sultan Abdulhamid II had already decided the wooden tomb wasn’t sufficient, and it was him who built the original marble tomb.
In November 1898 when Wilhelm visited Damascus, the Ottoman sultan was hoping for an alliance or some sort of assistance, since England, France, and Russia were already picking away at the empire, including its territory in the Middle East. Wilhelm praised the Ottoman sultan, as well as Saladin,
“one of the most chivalrous sovereigns of all time…a fearless knight beyond reproach, who often had to teach his enemies true chivalry.” (Eddé, pg. 495)
Wilhelm also placed flowers on Saladin’s tomb, and he paid to restore the marble tomb that Abdulhamid had built, which was apparently not beautiful enough (another example where westerners actually disdained eastern things even if they outwardly praised them). The restored tomb included a silver lamp, a gilded wooden laurel wreath, and various other decorations, which were finished by 1903. (Incidentally, after World War I, when the German-Ottoman alliance was defeated and both empires were destroyed, T.E. Lawrence stole the gilded wreath and brought it to London.)
But why did Wilhelm feel so strongly about Saladin in the first place? Well regardless of whether or not Saladin had been forgotten by Muslims (he hadn’t!), he had always been popular in the west, since as far back as his own lifetime during the Third Crusade. He was sometimes depicted as a cruel tyrant in Christian sources, but mostly he was considered to be an honourable warrior, a worthy opponent, equal to or maybe even surpassing the chivalrous character of western knights. Dante placed him in Limbo with the “virtuous pagans”. Boccaccio also depicted Saladin as a heroic knight. Closer to Wilhelm’s time, lots of popular and academic histories of the crusades were being written, as well as popular novels like Walter Scott’s “Tales of the Crusades”. Saladin is a major character in The Talisman, the second book of Scott’s series. The Talisman was translated into German and Wilhelm had read it.
“…by the time of Kaiser Wilhelm’s visit to Damascus in 1898 the image of Saladin as a religiously tolerant and chivalric persona was firmly fixed in western culture; the sultan was indeed a noble figure whom Wilhelm could understand in the most positive terms and express his admiration for…” (Phillips, pg. 328)
So, Wilhelm was a big fan of Saladin because of the centuries of European literature that depicted Saladin as a noble hero. He visited Damascus as part of discussions for an alliance with the Ottoman sultan, and while he was there he wanted to spruce up Saladin’s marble tomb. But the marble tomb already existed, it was actually built by the Ottomans.
Sources:
Diana Abouali, “Saladin's Legacy in the Middle East before the Nineteenth Century,” in Crusades 10 (2011)
Jonathan Phillips, The Life and Legend of the Sultan Saladin (Yale University Press, 2019)
Anne-Marie Eddé, Saladin (Flammarion, 2008, and translated into English in a 2014 edition by Jane Marie Todd)