The only two legit ways I know of that you can make money while not working is to open a savings account and put some extra money from your paycheck into the savings account and let the money grow through interest overtime.
Another way is to invest some of your money into stocks that can earn you some money while you sleep or when you're not working but you need a good stock broker or know what you're doing in order to earn money and not lose money in the stock market.
Another way of earning money that's legit but requires some work up front is to blog on a high paying niche and write the blog on topics and keywords that get highly searched and if you write the blog in the correct niche with lots of searches you can gain lots of targeted traffic and then can earn money from the blog.
Some ways of earning money from the blog are E Books, Affiliate Sales, Adsense, Media.net or Native Ad Networks such as Taboola, Outbrain, Content.ad and much more.
But you need the traffic in order to earn money and it will take some hard work in the beginning to get the traffic coming and the income coming in.
It took my blog nearly 6 years to make enough income where I could quit my office job and now that I'm making money blogging I no longer work the office job and earn money even in my sleep or when I'm not blogging.
I still blog and add new blog posts but I don't have to write blog posts as often to keep the traffic coming.