In The Name of Allaah, The Most Merciful, The Bestower of Mercy.
This affair is found in many places in the Qur’aan. Allaah made a mention of it regarding the first immigrants who left behind their dwellings, wealth and beloved ones for the sake of Allaah, so Allaah substituted that for them with an enlarged provision, honour and authority in this worldly life.
And when Ibraaheem [alayhis salaam] disassociated himself from his people and from his father and that which they worshipped besides Allaah, Allah bestowed upon him Ishaaq, Yaqoob and Righteous Offspring.
And when Sulaymaan [alayhis salaam] was distracted -by his horses- from the remembrance of Allaah, he got rid of them, so Allaah substituted them. [Allaah said]:
فَسَخَّرۡنَا لَهُ ٱلرِّيحَ تَجۡرِى بِأَمۡرِهِۦ رُخَآءً حَيۡثُ أَصَابَ
وَٱلشَّيَـٰطِينَ كُلَّ بَنَّآءٍ۬ وَغَوَّاصٍ۬
So, We subjected to him the wind; it blew gently by his order whithersoever he willed. And also the Shayaateen (devils) from the jinn (including) every kind of builder and diver. [38:36-37]
And when the people of the cave [i.e. the young men mentioned in Surah Al-kahf] disassociated themselves from their people and that which they worshipped besides Allaah, Allaah bestowed upon them His Mercy, and facilitated for them means to success and tranquillity, and made them a guide for the misguided ones.
And [regarding] Maryam [alayhas salaam] Allaah said:
وَٱلَّتِىٓ أَحۡصَنَتۡ فَرۡجَهَا فَنَفَخۡنَا فِيهَا مِن رُّوحِنَا وَجَعَلۡنَـٰهَا وَٱبۡنَهَآ ءَايَةً۬ لِّلۡعَـٰلَمِينَ
And she who guarded her chastity (virgin maryam), We breathed into (the sleeves of) her (shirt or garment) (through our Ruh Jibraa-eel), and We made her and her son (Eesaa) a sign for the Aalameen (mankind and jinn) [21:91]
And whoever abandons what his nafs calls him [or her] to -the lowly desires- Allaah [Glorified Be He] will substitute it for the person with love of Allaah, being repentant to Allaah and [also] with what is SUPERIOR to that which is gathered for him [or her] of the pleasures of the worldly life.
[Source: An Excerpt from ‘Qawaa-idul Hisaan Li-Tafseeril Quraan’ page 164. slightly paraphrased]