Serbian here... Also never heard of it. But I suspect that it has something to do with another, similar one: U dobru se ne ponesi, u zlu ne ponizi/У добру се не понеси, у злу не понизи. Which roughly (because it is archaic) translates to: Be humble when all is good (in good fortune), do not submit to evil (bad, unfortunate, hard) times.