How to troubleshoot "refrigerator power goes off occasionally but comes back on when I cycle power switch off and back on"?
It's probably just a twitchy power switch (spoiler: it was). Replace it or, if it can be cleaned, cleaning might fix it. For sake of completeness:
Try to determine if the power switch is a simple switch or if it is connected to some kind of built-in circuit breaking device. If a circuit breaker somewhere in the refrigerator is being activated, and reset when the power switch is cycled, the breaker could be faulty else it is receiving out-of-specification power from somewhere "upstream" (e.g. house wiring or a faulty component in the appliance).

Otherwise, use a multimeter to check for electrical fault in the refrigerator: If there is not continuity across the power switch when the fridge has "gone off," repair or replace the switch. If there is continuity, test voltage and continuity "downstream" from the AC plug until you find a fault. An electrical diagram of the appliance may help.

Thanks to mjohns and jPhi1618 for comments that formed the bulk of this answer.