I'm from Greece and in our history the years of Ottoman rule are taught and seen as "400 years of slavery" and that we suffered a great deal under the Turkish yoke and so on. Is the same narrative being used in the Muslim countries that were part of the Ottoman empire, or is their years under it seen as something more benign?
The short answer is yes.
The Ottomans probably have the worst reputation in the countries of the Levant, which suffered very badly during the First World War, largely due to reprisals from the Ottoman army, which took food (resulting in widespread famine), pressed local men into military services, and destroyed things as they retreated ahead of the British advance. (See, for example: Salim Tamari's Year of the Locust or Layla Fawaz's A Land of Aching Hearts.)
Since this catastrophic series of events came at the very end of Ottoman rule--similar to the Armenian and Assyrian genocides, and what's known in Greece as Ἡ Ἀνταλλαγή--it's understandably had a deep impact upon popular memories of Ottoman rule. (The sultan wasn't actually running the empire at this point -- he hadn't been deposed, but power was effectively in the hands of the Three Pashas: Enver, Talaat, and Cemal--after 1913).
Ottoman rule is less reviled in Egypt--it's kind of seen as a period of stagnation; which ended with the appointment of Mehmet Ali (Muhammad Ali in Arabic) in 1805 -- ironically, as the Ottoman governor, who managed to take power away from the Mamluks whose reign pre-dated the Ottoman invasion of 1517. Mehmet Ali was able to maneuver Egypt into autonomy and began a rapid process of developing the country over the course of the century, and he is now remembered as "the founder of Modern Egypt." (See: Robert Tignor, Egypt: a Short History, for example).
That he was quintessentially Ottoman (an ethnic Albanian, born in Kavala--in Thrace, which is now in northern Greece--and served in the Ottoman army) and never learned to speak Arabic doesn't get much mention!