it probably makes sense to take some profit out of the stock market and reduce your mortgage principle. By this way you play safe. If your debt is not that big, you probably can manage the risk by leaving the money in the stock market a bit longer, hoping for higher return.