Have the correct intention:
“Verily, actions are judged by intentions and every person gets the reward of what he intended…”
[Commentary on Hadeeth: The Reward of Deeds depends upon the Intentions]
Know, that all permissible action, like sleeping, eating, working and other than these, can be changed into acts of obedience and a means of nearness to Allah subhanahu wa ta’ala. One can obtain many good deeds due to these actions, if they have the intention of drawing close to Allah subhanahu wa ta’ala when doing them. For example, if you go to sleep early, so you can wake up for Qiyaam Al-Layl or Salah Al-Fajr, then this sleeping becomes an act of worship. This is true for all other permissible actions.