Asking Allaah for something that cannot happen and is contrary to the laws of nature, such as asking for the dead to be revived, or asking to go back to the age of youth, and similar matters. It comes under the heading of transgression in supplication, which is forbidden. Allaah says (interpretation of the meaning):
“Call on your Lord with humility and in private: for Allaah does not love those who trespass beyond bounds”
al-Qurtubi said in al-Jaami’ li Ahkaam al-Qur’aan (7/226): Transgression in supplication takes several forms, and includes: speaking too loudly and screaming; praying to have the status of a Prophet or praying for impossible things and other kinds of excess. All of these things mean that the supplication will not be answered. End quote.
Shaykh al-Islam Ibn Taymiyah said in Majmoo’ al-Fataawa (15/22):
Transgression in supplication may mean asking for that which it is not permissible to ask for, such as help to do haraam things; or asking for something that Allaah does not do, such as asking to live until the Day of Resurrection, or asking Him to relieve him of human necessities, such as the need for food and drink, or asking Him to give him knowledge of the unseen, or to make him one of the infallible, or to give him a child without a wife, and other things the asking of which is a transgression which Allaah does not like and He does not like the one who asks for it. End quote.
Ibn ‘Aabideen said in Radd al-Muhtaar (1/561):
It is haraam to ask for lifelong well-being, or to ask for the best of the two realms and to ward off the bad thereof, or to ask for things that are ordinarily impossible, such as sending down from heaven a table spread with food. End quote.
From this it will be clear to you that it is not permissible to ask Allaah to revive a relative who has died or to restore an amputated hand, because Allaah, may He be exalted, has decreed that such things should not ordinarily happen.
And Allaah knows best.