Geraghty claimed his second win in the big race on the 11-4 favourite, trained by Nicky Henderson, but said he had mixed emotions as he passed the winning line.
"It's very upsetting. We are hoping and praying that JT will be all right," said the 33-year-old Irish rider, who also won aboard Kicking King in 2005.
Amateur jockey McNamara had surgery less than four hours before jump racing's showpiece event after a fall at the Cheltenham Festival on Thursday.
The 37-year-old suffered serious neck injuries, fracturing his C3 and C4 vertebrae, and is being treated at Frenchay Hospital in Bristol.
Geraghty said: "I just wish it were a happier day, because we are all upset about John Thomas.
"You have to put it out of your mind when you're racing but, even though this is one of the biggest days of my career, all I could think about was John Thomas. He's a friend of ours and I hope and pray he will be OK.
"When you are out there, you are doing a job. When you finish, it comes straight to you in a moment like that. It was bittersweet."
Geraghty and his brother Ross bought Bobs Worth as a yearling for 16,500 euros (£14,275) and sold him to Henderson as a four-year-old for £20,000.
The eight-year-old, in only his sixth race over fences, won at Cheltenham for the fifth time in his career and secured a third successive Festival triumph after victories in the Albert Bartlett Novices' Hurdle and RSA Chase.
Bobs Worth, who had last run when winning the Hennessy Gold Cup at Newbury 104 days earlier, showed the break did no harm as he came from behind to power past Sir Des Champs and Long Run.
Sir Des Champs, the mount of late substitute AP McCoy after usual partner Davy Russell punctured a lung, challenged leader Long Run going round the home turn.
As a 67,000 crowd roared on, the 17-time champion went head-to-head with amateur jockey Sam Waley-Cohen, on 2011 winner Long Run, who was third behind McCoy and victor Synchronised last year.
But Geraghty had stamina to burn on his mount and he devoured the demanding Cheltenham hill for a resounding success.
In a vintage renewal featuring some potentially improving young steeplechasers, the Paul Nicholls-trained Silviniaco Conti also looked a leading player before falling at the third fence from home.
"There is not a bother on him and he would be all right to go to Aintree or Punchestown," said jockey Ruby Walsh. "This is not bad luck. I am still standing and the horse got up - that's good luck."
Last year's runner-up The Giant Bolster, trained by David Bridgwater, finished fourth and may have been slightly inconvenienced by the rain-softened going.