Before Hashem performs a miracle for a person, that person falls into misfortune, all in proportion to the greatness of the miracle.
Sefer HaMidos, Salvation and Miracles, Part I §9