If just one side was sticking up or down, I would suggest that the problem is the retractor motor cam switch or a remote chance that the retractor relay or cut relay for that side has an intermittent problem. Since I gather they are both sticking in the up position and since the problem is initiated by more than one switch (both the manual retractor switch and the headlight flasher), I am inclined to think that the problem is with the headlight retractor control unit or possibly a bad connection to the control unit.
The service manual sets out a test procedure for the control unit. However, carrying out the test procedure when it is in its intermittently working phase will probably give you a pass the test result. You will have to wait until next time it sticks and try the test. Unfortunately, my hazy recollection is that the control unit is jammed into one of those not fun to get to places!
Edit
Actually, not so hard to get at. Its mounted on the back bulkhead, not under the dash by the starter cut relay which is what I was thinking.