You file for Chapter 13 bankruptcy and get a five-year repayment plan. It's based around your current income and your budget basically allocates everything that you have toward paying your necessary expenses or paying into that repayment plan. You don't worry about investing because you just want to eliminate that debt.
Two years go by. You make each monthly payment. Then, you get a sudden windfall. Maybe you win a minor lottery or get an inheritance from a parent. Maybe your spouse, who wasn't working, gets a job. Perhaps you sell a valuable asset that you'd retained during bankruptcy, making a profit. Now that you have extra money, can you invest it?
You may be able to, but don't do it right away. The terms of your Chapter 13 agreement likely say that you have to go before the court, disclose the change in assets and ask for permission to invest.
The reason is that the court may determine that your creditors are owed that money. The reason they agreed to the repayment plan was because you didn't have the money before, so that plan was the only way that they'd get their money back -- albeit over a long period of time. While the court may allow you to invest your new money, you have to get permission first to make sure you're really free to use it as you please.
Whenever you file for bankruptcy, make sure you think of the big picture. You need to understand your rights and obligations going forward, even if your financial situation happens to change.
Source: The Nest, "Investing During Chapter 13," Katie Jensen, accessed April 28, 2017