The Prophet ﷺ was sitting with his Companions when they saw a strong, energetic young man going out to work from the early morning. Some of the Companions said:
”Poor young man! If only he would devote his youth and strength in the way of Allah, it would be better for him.”
Then the Prophet ﷺ said:
The proof comes from the teaching of intention in Islam. The Prophet Muhammad said: Actions are judged by intentions, and every person will get what they intended.
— Ṣaḥīḥ al-Bukhārī & Ṣaḥīḥ Muslim
Many people think worship is only prayer, fasting, or reciting Qur’an. But in Islam, even sleep can become an act of worship if the intention behind it is good.
For example:
Sleeping early so you can wake up for Fajr or Tahajjud. ...
Resting so your body becomes strong enough to work halal jobs and provide for your family.
Sleeping to recover energy for studying, ibadah, teaching, or helping people.