I do not know it except that he traced it back to the Prophet ﷺ, who said that Allah, glorified is He, says, "Son of Adam, devote yourself to My worship and I will fill your heart with contentment and relieve your poverty. But if you do not, I will fill your heart with preoccupation and will not relieve your poverty."
حدثنا نصر بن علي الجهضمي حدثنا عبد الله بن داود عن عمران بن زائدة عن أبيه عن أبي خالد الوالبي
ولا أعلمه إلا قد رفعه قال يقول الله سبحانه يا ابن آدم تفرغ لعبادتي أملأ صدرك غنى وأسد فقرك وإن لم تفعل ملأت صدرك شغلا ولم أسد فقرك
[Its chain of transmission is hasan] Tirmidhi transmitted it in Zuhd, chapter, "Hadiths, We were tested with hardship, and whoever..." etc., no. 2466, from the hadith of Imran through this route, and he said it is hasan gharib. Abu Khalid whose concern was the Hereafter, al-Walibi, and Zaida bin Nashit were both deemed reliable by Ibn Khuzayma, Ibn Hibban, Hakim, and others, so their hadith does not fall below the level of hasan. Refer to Nayl al-Maqsud, no. 1328.