Kevin Manley was awarded £3,750 after a judge ruled operators of the privately-owned Parc Prison in Bridgend failed to restore power in a reasonable time.
Now a High Court judge has dismissed an appeal by owner G4S.
Manley, who has mobility problems after a hip replacement, tripped and banged his head on a cupboard while the light was out, the court heard.
G4S disputed the claim it had breached a duty to ensure he was "reasonably safe" in his cell.
Judge Neil Bidder first heard the case at Cardiff County Court last year.
He concluded power should have been restored in 20 minutes at most - but heard Manley's cell had been in darkness for nearly twice that on 4 January 2013.
He ruled G4S's breach of a duty of care caused Manley an injury.
Mr Justice Lewis analysed the case at a High Court hearing in Cardiff in July and dismissed G4S's appeal in a written ruling published on Friday.
The judge did not say why Manley was in jail or give his age.
A prisoner who got damages after his cell light went out for 40 minutes has won the latest round of a legal battle.