There seem to be at least two sources of the Ottoman crescent, none of them related to Islam.
1) The standard of the Kayihan Khanate, founded by Osman Gazi (Osman I) in western Anatolia. It is said the symbol on the standard goes back to the seal or tamgha of the ancestral Kayi tribe.
2) The crescent and the star of Byzantion (later Constantinople). Here on a coin from the 1 century BC [Moushmov 3233]
The same symbol is retained when Byzantion is part of the Roman Empire. Here on a coin from the reign of Trajan (98-117) [Varbanov 1638].
and it occurs on Byzantine coinage as late as the 14th century, like this coin [SB 2483] from the reign of Andronicus III Palaeologus (1328-1341).
One contemporary of Emperor Andronicus was Orhan Khan (the son of Osman Gazi) who conquered most of the remaining Byzantine possessions in Anatolia. He also married Theodora, daughter of Andronicus' successor John VI Kantakouzenos, so Orhans successors as khans and sultans may also have claimed to be descendants of Byzintine emperors.
When Sultan Mehmet had conquered Constantinople in 1453 he claimed the title of Kayser-i Rûm, emperor of Rome. Taking possession of an age old symbol for Byzantion/Constantinople like the crescent and the star might have seen a logical way of reinforcing this claim.
His grandson Sultan Selim, conquered Cairo & the Mamluk Sultanate and claimed the title Khalifa of Islam. This standard of Sultan Selim prominently features the Zulfiqar or sword of Islam, but also - six times the crescent of the moon with a star.