The 15-metre whale surfaced in the middle of a group of surfers about 10.30am knocking several boardriders into the air with its tail.
Rajapakse was knocked unconscious by the blow, with fellow surfers helping him to shore where he was put in a neck brace.
A NSW Ambulance spokesman said he was transported to St Vincent’s Hospital in a stable condition.
Bondi lifeguard Anthony “Harries” Carroll said the whale was about 75 metres from where surfers were taking off on waves, but some of the boardriders and swimmers had decided to go in for a closer look.
He said one of the lifeguards was heading out to warn people they were getting too close to the marine animal when Rajapakse got caught in its path.
“The whale has lifted his tail and its come down and struck the (surfer) on the head and knocked him out,” he said.
Mr Carroll said the force of the blow also punched a “large-sized ding” in the man’s surfboard and other boardriders had taken care of him until lifeguards arrived and took over.
The man was treated as having a suspected spinal injury before his care was handed to paramedics.
Mr Carroll said it was the first time he had heard of someone being hit by a whale at Bondi, where he had worked as a lifeguard for 18 years.
“I think the whale was just positioning himself, more than being frightened,” he said.
“The surfers have got in his scene – it’s his backyard, and people should respect that.”