Mu'adh b. Jabal reported God’s Messenger as saying, “If any Muslim goes to bed in a state of purity making mention of God, then is disturbed [from sleep] during the night and asks God for good, God will give it to him.”
Ahmad and Abu Dawud transmitted it.