This quote is saying that when things seem to be going well, that can sometimes lead to a situation that causes unhappiness. It’s suggesting that sometimes when things become too good and we get complacent, bad things can happen and cause us to be miserable. It’s saying that often our own complacency and feeling of happiness leads us to problems and unhappiness.