OK. If you can hear the relays clicking when you activate the switch, but the trim motor only runs sometimes or when it runs it sounds weak, then you need to clean and tighten your battery connections and inspect the black ground wire connection coming from the trim relay harness (make sure it is clean and tight). If it still doesn't operate after that then the voltage needs to be tested throughout its path to make sure the trim motor itself isn't failing.
If there is no "click" when the switch is activated, then you either have a failing switch, a bad connection in the main harness, or bad relays.
Typically anytime something electrical works SOMETIMES, or works only when it's warm but not when it's cold.....It is usually the result of a bad ground connection somewhere in the circuit.