The value to be obtained is always relative to some other option - so what else would you do with the money, if not putting it down on a house?
Here's one way you could try to work it: put the money in some as-safe-as-one-can-hope-for guaranteed investment, such as treasury bills. Lets say that at the same time as you can get a mortgage for 4%, you can get a 2% return on a safe investment.
What this means is that you would then be paying an effective 2% interest rate on the borrowed money.
The gamble here is that the guaranteed rate of return investments are short-term, while the mortgage is long-term. If interest rates fall, you can pay off the mortgage as a kind of stop-loss, or refinance at the new lower rate. Obviously there are fees for the mortgage and for any refinance, but let's pretend there isn't for a minute.
Let's say rates increase and rates on mortgages and broader things like the bond/t-bill market run together, and we say that now you can safely invest at 4% rate of return. In this case you can move your liquid investments over to them, and now your mortgage is effectively free - the money you would use to pay it off is getting the same 4% as you are paying out, so there is no net profit.
If rates move even further, then you could take the money freed up by the mortgage and actually turn a little profit of a percent or two, as you borrowed money at a time when money was cheap and now you can effectively lend it out as a profit.
This is all effectively making your own "option", and you are paying a set fee of whatever your mortgage costs every year, set against the possibility of profit if a specific change happens (such as rates increasing).
The problem is that you are speculating on long-term macroeconomic factors you should not expect you can predict with any fine-grained accuracy, and you are taking on debt to allow you to take on speculative investments. This is a pretty great recipe for ending up misunderstanding your own exposure to risk, and the combination of debt with speculation means you are undergoing some very substantial risks (including the potential downside of losing your house because it is a secured loan) and doing so with borrowed money on top of it.
You should also plan for what you would do if guaranteed investments weren't paying enough back to make your bet payoff. Would the increase in rates encourage you to switch to riskier investments, as you start comparing the 4% mortgage to the 8-12%+ gains non-guaranteed investments are getting? For how many years would you be willing to pay this continual cost before you become swayed to increase your risk? Do you have the capital and the will to continue throwing money at paying the net mortgage costs? At what point would you decide you were wrong and decide to stop your losses?