The reason why Muslims lost their advantage in warfare and technology over the west is because Muslim rulers (and the elite of the Muslim empires) began to focus much less towards science and education and more towards building palaces, huge magnificent gardens, fountains, and other luxurious architecture. And not only that, but they also began to spend more time watching captured non-Muslim women belly dance or satisfy their lusts and less time on planning on and funding educational institutes, they would build huge Harems full of hundreds of women while neglecting the military and scientific fields.
The reason why the Europeans were able to advance in field of military technology and strategy is due to the fact that European kingdoms had been in state of war with each other for almost more than 1,000 years, and within this time frame they spent a lot of $ on R&D, exploration, expeditions, etc, while on the other hand Muslims became lazy and preoccupied with worldly gains.