The former prime ministers signed an amendment to the government’s Levelling Up Bill tabled by Simon Clarke, who served as a minister in both their governments, to allow onshore wind development.
Mr Clarke said he was “delighted” to gain their backing.
It marks the pair’s first major parliamentary interventions since departing Downing Street.
Ms Truss moved to relax planning rules during her short tenure at No 10, but Mr Johnson did not seek to overturn the effective moratorium on onshore wind, in place since 2015, when he was in office.
Mr Sunak has already faced a significant challenge over planning policy from within his own party.
The prime minister pulled a vote, scheduled for Monday, on legislation that would set a target of building 300,000 homes per year after about 50 Tory MPs threatened to rebel.
Mr Clarke, a former levelling up secretary, tweeted: “Delighted to have the backing of @BorisJohnson and @trussliz, together with MPs from right across the Conservative Party, for my amendment to allow onshore wind where (and only where) there is community consent.
“A pro growth, pro green policy at a time when we need both.”
Calls for ending the ban on new onshore wind farms have grown amid efforts to secure the UK’s energy independence as Russia’s invasion of Ukraine has squeezed supplies.
Sir Keir Starmer has vowed that a Labour Government would scrap the planning ban as part of its plan to make the UK a clean energy superpower.
The Labour leader has described Mr Sunak’s refusal to do so as a “national act of self-harm, choking off our economic potential”.