This is going to be weird advice but maybe you'll like it. While the vanilla advice of "invest expecting a higher return" is probably correct, that kind of thing rarely get me thinking and excited about my money.
Take 100 points and divide them into these three categories based on how important they are to you and your money: cashflow, security, and longevity. This will then be the percent you put toward your student loan, your mortgage, and investments respectively from your monthly savings.
For example, let’s assume you’re really, really happy where you are now and want lots of stability for that, yet you also have a healthy family history and expect a long, leisurely life. Your immediate needs are few and tend to be carefully thought out. Your allocation might look like this:
Cashflow (Student Loans) – 10%
Security (Mortgage) – 60%
Longevity (Investments) – 30%
So if you saved $1,000 per month after all your minimum payments, you’d put $100 toward the student loans, $600 toward your mortgage, and $300 for investing.
Every few months, reevaluate and see if your priorities have changed and adjust accordingly. (I told you it was weird.)