The phrase is "the marriage is on the rocks" (plural). The image is of a shipwreck. The marriage is the ship, and it has been driven aground on a rocky shore and is breaking up.
I'm not sure, but I think this expression may have been popularized by the once-hugely-popular newspaper columnist, Walter Winchell. He definitely is responsible for "phffft" (meaning the imminent breakup of a couple). The phrase "the two of them are an item" is also a reference to Winchell, meaning that Winchell would mention the budding romance between a couple as an "item" in his column.
The same phrase "on the rocks" also means an alcoholic drink served over ice. "Scotch on the rocks" means Scotch whiskey poured over ice instead of being served "neat" in a "shot glass."