Yes sprinkling baking soda onto carpet can help to clean and deodorize carpet.
You should first spray some vinegar that you mix with water onto the carpet and then sprinkle some baking soda onto the carpet.
Then use a carpet cleaner to clean the carpet as normal.
You can also mix vinegar into your carpet cleaner and use the vinegar and water as a natural carpet cleaning solution.
If your carpet has a musty smell to it or you just want to freshen your carpet you can just sprinkle the baking soda onto the carpet and then let it sit for 30 minutes to an hour and then vacuum the baking soda up from the carpet.