"The fast was to press for the release of General Sarath Fonseka," NBF head Dambara Amila told reporters in Colombo. "The government will have to pay for this."
A court martial is set to resume its hearings on Tuesday against Fonseka, who failed to unseat Rajapakse in January elections.
He faces one set of charges that he interfered in politics before he retired from the army, and another alleging he was involved in corrupt arms deals.
The monks said they planned a mass rally to keep up pressure on the government to free Fonseka, who was detained on February 8.
Plain-clothed officers on Monday bundled the protesting monks onto a bus as armed police ringed the railway station where they had begun a fast over the weekend.
Fonseka, who is also running in Thursday's parliamentary elections, denies the court charges and says they are part of a vendetta against him.
He fell out with Rajapakse and quit the military in November, six months after leading the military offensive that finally crushed the separatist Tamil Tigers rebels.