The phrase “no rest for the wicked” is based on Isaiah chapter 48 verse 20 and chapter 57 verses 20 and 21:
20 But the wicked are like the troubled sea, when it cannot rest, whose waters cast up mire and dirt. 21 There is no peace, saith my God, to the wicked.
The assertion at Dictionary.com that the verse refers to eternal torment is not supported by the context or by any Bible commentary of which I am aware.
The actual idea Isaiah expresses in his book is that humans will have a better life if they allow God to guide them. To illustrate, here are verses 17 through 19 of chapter 48:
This is what the Lord says—
your Redeemer, the Holy One of Israel:
“I am the Lord your God,
who teaches you what is best for you,
who directs you in the way you should go.
If only you had paid attention to my commands,
your peace would have been like a river,
your well-being like the waves of the sea.
Your descendants would have been like the sand,
your children like its numberless grains;
their name would never be blotted out
nor destroyed from before me.”
So those who follow God’s advice for life as conveyed through prophets such as Isaiah will prosper. In contrast, the “wicked” (defined as those who sin by doing such things as worshiping idols or engaging in dishonest business practices) will experience unnecessary troubles in life. It is in this sense that there is no peace for them.
Within Christianity the view is that all humans are sinners, just some more than others. As the Apostle Paul says “All have sinned and fallen short of the glory of God.” (Romans 3:23). So even a believer could experience self-inflicted troubles due to failure to apply Biblical advice for stress-free living. Until well into the 20th century the average person would have been familiar with these ideas whether they were a believing Christian or not.
So the phrase “no rest for the wicked” is a self deprecating suggestion that whatever new difficulty has arisen is a consequence of the speaker’s own failure to organize and conduct their life in the best way.
A version of this article was posted at https://scifi.stackexchange.com/questions/255570/what-do-sam-and-die-hardman-mean-by-no-rest-for-the-wicked-and-idle-hands-and#255661