The first issue that is important to understand here is that the role of the Indian Sultanates in the decline of Buddhism in India has been greatly exaggerated. As Romila Thapar describes in her book Somanatha, British historians had a vested interest in producing a narrative of Indian history that reinforced the stereotype of Muslims as violent conquerers who eliminated indigenous religious institutions. This supported the British policy of divide and rule. In fact, by and large Islamic rulers in India were more than happy to patronize indigenous religious institutions so long as they were cooperative and influential. But by the time the Islamic Sultanates were coming into power, the influence of Buddhist institutions had already been waning for a very long time.
Some of our best evidence for the decline of Buddhism comes from Chinese pilgrims in India, such as Xuanzang (602-664 CE) who visited India for 15 years or so starting around 629 during the reign of Harsha, the last major patron of Buddhism in India. Despite this patronage, Xuanzang bemoaned the state of Buddhism in India. He wrote that monasteries frequently housed far fewer monks than they had been built for, suggesting a decline in the Buddhist population. Many institutions seemed to have fallen into disrepair, and at times he reported signs of anti-Buddhist violence.
Buddhists by this time were completely dependent upon royal patronage for their survival and had lost their connection with lay peasants. Earlier in history, Buddhists interacted with lay peasants much more extensively, such as by acquiring their food through begging. With the expansion of royal patronage in India, Buddhists came to be increasingly cloistered in a sort of ivory tower environment, where they debated philosophical issues that were of little interest to the laity. Jains and what we would now call Hindus maintained their connection to the peasantry much more effectively by providing them with ritual services and involving themselves in popular grassroots movements. Since royalty patronizes religious institutions as a way to legitimize their dynasty in the eyes of their subjects, the support network for Buddhism in India grew very tenuous, as did the pool of potential converts who might refresh the monastic population.
For a more detailed discussion of the decline of Buddhism in India and the role of Muslims, Brahmins, etc. in this process, you might look at:
Sarao, KTS. 2012. The Decline of Buddhism in India: A Fresh Perspective. New Delhi: Munshiram Manoharlal Publishers Pvt. Ltd.