Move the signal lever down (for a left turn) or up (for a right turn) to the stop position. The signal will self-cancel after the turn is completed.
If the indicator light continues to flash after a turn, manually return the lever to its original position.

The turn signal indicators in the instrument cluster flash according to the operation of the turn signal lever to show which signal is working.

NOTE
Turn and Lane-Change Signals
Lane-Change Signals and Three-Flash Turn SignalMazda 6 Owners Manual: Intermittent concern troubleshooting
Vibration Method
1. If malfunction occurs or becomes worse while driving on a rough road or
when engine is vibrating, perform the steps below.
Note
There are several reasons vehicle or engine vibration could cause
an electrical malfunction. Some of the things to check for are:
...
Mazda 6 Owners Manual: Cargo compartment light switch inspection
1. Remove the liftgate lower trim. (See LIFTGATE LOWER TRIM
REMOVAL/INSTALLATION)
2. Disconnect the cargo compartment light switch connector.
3. Inspect for continuity between the cargo compartment light switch
terminals using an ohmmeter.
If not as specified, replace the liftgate lock.
...