If the cap fits, wear it
Means that if a situation is found to be appropriate, then accept it. It is an old British saying from at least the 17th century. The American version is if the shoe fits…and dates from at least the 18th century.