The Federal Constitutional Court said the plaintiff was right in challenging a prison policy which allowed only female inmates to spend €25 ($32) of their own money on cosmetic and skin care products each month.
"Although the interest in cosmetics may be more widespread or frequently stronger among women than among men, it is not a biologically determined interest among women," the court ruled. "Members of one sex cannot be denied their wellness choices simply because they are more typically found among the opposite sex."
It said the current practice of only allowing women to purchase beauty products amounted to a violation of the protection against sex discrimination under Germany's Basic Law.
The plaintiff's lawyer, Kai Zimmermann, told AFP that his client had fought through lower courts to Germany's top tribunal in the south-western city of Karlsruhe for "the right to use aftershave, moisturiser and the like". The case will now go back to a lower court. Zimmermann declined to give his client's name, age or the crime for which he is serving time.