The pair were among a group on a boat on the Moyle River in northern Australia when the accident occurred.
Botham, 68, escaped with nothing worse than heavy bruising.
Writing on Instagram alongside a photograph of a large fish, the former England all-rounder said: "My catch of the day was the barra (fish) while I was nearly catch of the day for all the crocs and bull sharks... thanks boys for getting me out."
England's Botham and Australian fast bowler Hughes crossed swords on the pitch in the late 1980s but have remained friends.
Botham joked about his similarity to legendary Australian film character Crocodile Dundee, saying in the Herald Sun: "At the end of the day, Crocodile Beefy survived.
"I was out of the water quicker than I went in it. Quite a few sets of eyes were having a peep at me. Luckily I had no time to think about what was in the water. The guys were brilliant, it was just one of those accidents. It was all very quick and I'm OK now."
Botham, who was a swashbuckling all-rounder, is considered one of England's greatest cricketers, scoring 5,200 Test runs and taking 383 wickets during his career.
He played his final Test in 1992.