Placing Qur’aanic aayahs under the pillow

What is the ruling of writing some verses from the Noble Qur’aan and placing them in a leather casing and putting it under the pillow after calamity has befallen in the hope of attaining cure due via the Qur’aan?

This is the same case as amulets which the Prophet ﷺ prohibited,

If anyone hangs anything on himself, he will be left to it.” (Tirmithy 2072)

And this is something Ibn Masood (may Allaah be pleased with him) was decisive about. He declared that, the family of ‘Abdu-llaah (i.e., his family) have become free of polytheism (Ibn Maajah 3528). These types of actions are not permissible. There is no doubt that placing amulets under the pillow or hanging them on the necks of children is degrading the Qur’aan. The Qur’aan was not revealed for this purpose. Hence, if a person were to put it under his pillow and sleep upon it while his head is above it then there is no doubt that this is degrading the Qur’aan. If it is hung on the necks of children then there is no doubt that it will also degrade the Qur’aan, because it will come in contact with impurities and dirt or children entering into unclean places such as toilets. All of this is not permissible, and it is prohibited on the grounds of prohibiting means to evil. This is because one person may wear an amulet with verses of the Qur’aan while another person may wear an amulet containing normal speech, and another person may wear superstitious spells which are polytheistic. In some cases, they are hung on leather casing, as per the question, and when it is opened blasphemous statements are written. In some cases, insects have been killed which were perhaps killed as a sacrifice to Satan. Therefore, prohibiting means to evil such as polytheism is the reason to prohibit this action and Allaah knows best.