All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
Death in water or in space is included in this verse because what is meant is that a person does not know the place of his death.
Ibn Al-Jawzi said in Zaad Al-Maseer fee ‘Ilm At-Tafseer, “{…and no soul perceives in what land it will die.} [Quran 31:34] means in what place.”
Also, Fat-h Al-Qadeer by Ash-Shawkaani reads, “{…and no soul perceives in what land it will die.} meaning in what place Allaah decrees that a soul will die.”
In general, people die on land, but some die by drowning, as it happened to the people of Nooh (Noah) and the people of Pharaoh. Allaah says (what means): {Theirs is] like the custom of the people of Pharaoh and of those before them. They denied the signs of their Lord, so We destroyed them for their sins, and We drowned the people of Pharaoh. And all [of them] were wrongdoers.} [Quran 8:54]
Allaah also says (what means): {And the people of Noah - when they denied the messengers, We drowned them, and We made them for mankind a sign. And We have prepared for the wrongdoers a painful punishment.} [Quran 25:37]
Ibn Abu Haatim reported in his Tafseer that Qataadah said about the verse (which means): “{Indeed, Allaah [alone] has knowledge of the Hour…}: "There are five things which only Allaah knows, no near angel knows them and no sent Prophet knows them; Indeed, Allaah [alone] has knowledge of the Hour, so no person knows when the Hour will take place, in which year or in which month, during the night or during the day. Allaah sends down the rain while no one knows when rain will come down, during the night or during the day. Allaah knows what is in the wombs whereas no one knows what is in the wombs whether it is a male or a female, red or black. And no soul perceives what it will earn tomorrow, whether it is good or bad; and no soul perceives in what land it will die, no one knows the place where he will die and whether that will be in the sea or on the land, in a plain or in a mountain.”
In this age, there is travel by air and the conquest of space, so it is not unlikely that some people die in the air also.
These five matters mentioned in the verse are the Keys of the Unseen as per the hadeeth that reads, “The keys of the Unseen are five, and none knows them but Allaah: no one knows when the Hour will be established but Allaah; no one knows what is in the wombs but Allaah; no one knows what will happen tomorrow but Allaah; no one knows in which land he will die but Allaah; and no one knows when it will rain but Allaah.” [Al-Bukhari]
You should know that the Unseen is not limited to these five matters, but it encompasses these above matters and the knowledge of the Unseen that Allaah knows; Allaah says (what means): {Indeed, Allaah is Knower of the unseen [aspects] of the heavens and earth. Indeed, He is Knowing of that within the breasts.} [Quran 35:38]
The scholars differed in opinion about the verse in Chapter Al-An’aam [Quran 6] and whether what is meant are these five matters or that it includes them as well as other matters. Ibn Al-Jawzi said in Zaad Al-Maseer fi ‘Ilm At-Tafseer:
“There are seven views about 'the Keys of the Unseen':
The First View is: there are five matters which no one knows but Allaah.
Al-Bukhari reported in al-Adab al-Mufrad from the hadeeth narrated by Ibn ‘Umar who said, 'The Prophet said, 'The Keys of the Unseen are five and none knows them but Allaah: no one knows when the Hour will be established but Allaah; no one knows what is in the wombs but Allaah; no one knows what will happen tomorrow but Allaah; no one knows in which land he will die but Allaah; and no one knows when it will rain but Allaah.'' [Al-Bukhari]
Ibn Mas'ood said, 'Your Prophet was given the knowledge of everything except the knowledge of the Unseen.'
The Second View: it consists of the treasures of the Unseen of the heavens such as fate and livelihoods; this was stated by Ibn ‘Abbaas .
The Third View is: What the creation does not know about the reward and punishment and what will happen in the future; this is stated by ‘Ataa’.
The Fourth View is: the treasures of the Unseen of punishment; when it [punishment] will come down. This is stated by Muqaatil.
The Fifth View is: to know the Unseen if one is asked about it. This was stated by Az-Zajjaaj.
The Sixth View is: the life span [how long one is going to live] and in what condition one is going to die.
The Seventh View is: What did not take place: whether it will take place or not? And what will take place: how it will take place. And what does not take place: if it had taken place how it would have taken place.”
Allaah knows best.