The inmates, Tagaloasa Filipaina and Ovaleni Poli Palau, were transferred from Tafaigata prison to the Apia police station in February 2018.
The pair had been suspected of planning a mass prison break out during a cyclone warning last February.
In her ruling, Justice Tafaiomalo Tuala Warren, said there was no breach of the applicant's constitutional rights.
She also encouraged the Commissioner of Prisons and Corrections to reassess the viability of taking the applicants to the newly built prison at Tanumalala, which is expected to be opened by July.
"I conclude that their conditions of detainment are not inhuman and or degrading", the ruling said.
However, the court has advised prison authorities to provide a doctor for the prisoners and for police to make sure they get an opportunity for exercise.
The court also asked authorities to provide the appropriate food for one of the prisoners who cannot eat chicken.