Lord Dyson, Master of the Rolls, said the legal challenges were to two "of the Government's most controversial measures" relating to state benefits.
The court could only intervene if the measures "were manifestly without reasonable foundation", the judge said.
He ruled that the test was not satisfied and both challenges must fail.
Representatives for two of the people with disabilities who lost their bid said they were "extremely disappointed" and "baffled" by the court's findings.
"We are currently considering whether an appeal to the Supreme Court is possible" said Ugo Hayter, from law firm Leigh Day.
Five disabled tenants have lost their bid at the Court of Appeal to have the UK Government's so-called "bedroom tax" declared unlawful.
The changes were introduced last April. People living in social housing who were deemed to have a spare bedroom were asked to downsize or accept a reduction in housing benefit.
Two lone parents have lost their separate Court of Appeal challenge to the legality of the "benefit cap".
Judges rejected claims that the policy violates human rights laws and the common law because of its impact on vulnerable families.
In test cases of national importance, today's ruling at the Court of Appeal will decide whether "bedroom tax" regulations, introduced last April, are an "excessive and unfair burden" on people with disabilities, or a lawful and "integral aspect" of the Government's deficit reduction programme.
Backed by the Equality and Human Rights Commission, lawyers for five tenants are arguing that the regulations cannot be allowed to stand.
The Department for Work and Pensions rejects the "bedroom tax" tag and says the reality is a "spare room subsidy" has been removed from social sector tenants.
The change in regulations is expected to produce savings of £500 million a year, but opponents say they have had a "devastating" impact on many people and fail to reflect the actual needs of disabled people for extra space.
The Court of Appeal will rule today on the legality of the Government's so-called "bedroom tax," which campaigners say unlawfully discriminates against the disabled.
Judges will also decide in a separate case whether or not the "benefit cap" violates human rights laws and the common law because of its impact on vulnerable families.
The Department for Work and Pensions said the regulations were now being amended and that it still believed its earlier estimate of the numbers affected by 'bedroom tax' errors was correct.
A spokesman said: "We expect very few people to be affected by this - around 5,000 - and are working with councils to ensure affected claimants are kept informed.
"The removal of the spare room subsidy means we still pay the majority of most claimants' rent, but the taxpayer can no longer afford to pay the £500 million cost of claimants' extra bedrooms."
Shadow work and pensions minister Chris Bryant has accused Iain Duncan Smith of "picking numbers out of thin air", with regards to the people wrongly charged the so-called 'bedroom tax'.
Iain Duncan Smith told Parliament that 3,000 to 5,000 people had been illegally charged the 'bedroom tax' thanks to the loophole, but it's now clear he was just picking numbers out of thin air.
The bedroom tax has been a fiasco from start to finish and now the Government have been caught out trying to downplay how many people are exempted by it.
This would be a farce if it weren't for the upset this has caused many vulnerable families and the huge cost to taxpayers.
Labour has accused the Government of understating the number of council tenants who have been wrongly hit by the so-called 'bedroom tax' changes to housing benefit.
The opposition party said local authority data showed that, as a result of a loophole in the legislation, at least 16,000 households had wrongly had their benefit cut - while the true figure could be closer to 50,000.
Work and Pensions Secretary Iain Duncan Smith has previously told MPs that between 3,000 to 5,000 tenants were thought to have been affected by the error.
But after submitting Freedom of Information requests to all 346 local authorities in the UK, Labour said responses from the 140 councils which have so far replied showed that 16,450 households had been incorrectly caught.
Shadow work and pensions minister Chris Bryant said that if there was a similar rate of wrongful deductions across the whole country, the final total would be almost 50,000.
Almost £11 million offered to councils to help social housing tenants struggling to pay so-called "bedroom tax" has been returned to the Government, the Work and Pensions Secretary has said.
Iain Duncan Smith claimed it showed the discretionary payments scheme was working despite scaremongering from Labour.
Speaking in the Commons, he said: "The reality is about £11 million was returned back to the department from under spends.
"The reality is the key thing here is discretionary housing payments are there to help the most vulnerable.
"Councils should use them, we have allocated an extra pot for those who think they may run over, so there is extra money to bid for and we are very happy to entertain those bids."
The chair of the Scottish Affairs Committee has labelled the Government's so-called "bedroom tax" as a "cruel burden", saying it's "designed to hit the poorest".
The committee has called for the scheme to be suspended for claimants who cannot reasonably be offered alternative accommodation.
Chairperson and Labour MP Ian Davidson said: "This is an interim report because, while the impact of the bedroom tax cannot yet be fully quantified, it is already clear that it is a cruel burden being placed upon the shoulders of those least able to bear it."
The Scottish Affairs Committee has called on the Government to suspend the "bedroom tax" penalty for claimants who cannot "reasonably" be offered alternative accommodation.
The MPs said the measure, which cuts housing benefit for social tenants deemed to have a spare room, was "a budget cut suffered by those in greatest need".
The interim report was opposed by Tory and Liberal Democrat MPs on the Labour-led committee, but they failed to prevent it being produced.
The committee said the report was designed to draw certain aspects of the scheme to the Government's attention, "notwithstanding our call for the tax to be abolished".
Introduced in April 2013, the changes mean those with an extra bedroom have a reduction of 14% to their eligible rent, and those with two or more extra bedrooms lose 25%.