GFIs (Ground Fault Interrupter) or GFCIs (Ground Fault Circuit Interrupter) can go bad. You might hear a regular clicking begin at any time, but it's especially disturbing at night. GFIs can and do fail (although rarely) and, usually, they won't be a fire hazard. First, push the Test button; it should produce a firm click. Next, push the Reset button until you feel it firmly click into place. That could temporarily solve the problem. The safest route is to take all precautions and shut down power at the breaker until you can replace the offender.
Those who are comfortable working with electrical components can easily replace the outlet. Use a tester to make sure the juice is off. Unscrew the old plate and detach the wiring, marking each for re-attachment to a new GFI. At the end of a chain, there should only be three wires; if there are outlets downstream, then you should see six wires. If you're not familiar with electrical outlets, call an electrician.