There's nothing really illegal about keeping any amount of cash in your home as long as you got the money legally then you should be fine.
Although it's not safe to keep large sums of money at home because someone could break into your home and possibly steal it or if you house catches on fire and burns up your cash and then there would be no way to get that amount of money back.
There's also a chance of losing that cash as well.
It's best to have the money in a savings account and especially a high yield savings account where your money can grow into larger amounts of money overtime.