This is caused by the dry solder electrical joints in the relay ( the metal expands in the heat and the connection is not completed, but once cooled off it shrinks), the relay can be easily opened and then with a solder gun you can just melt the joints and let them re-set.
quick and free fix.
did this with my 1990 Honda Civic
I recommend all car owners to go to a local “auto recycle yard” and purchase a assortment of relays for their car model. They can be as cheap as $2 each. (Different year models usually apply) Check with your own car for relay numbers etc. I have owned several Toyotas which had relay trouble which was only determined by direct replacement. I have relays test ok using the manufactures manual and procedure and only replacement would ID the deflected relay.