ABSTRACT A device and a method of automatically triggering the Functional Electrical Stimulation (FES) system based on complex gestures of a patient comprises an Inertial Measurement Unit (IMU) comprising a plurality of sensors and a Functional Electrical Stimulation (FES) system in addition with the Electromyogram (EMG) electrodes. The IMU is placed on the patient, for example on the hand, and measures complex gestures. The complex gestures refers to muscle activations, joint angles, limb positions/angles, joint angular velocities, grip of wrist/foot, proximity to an object in an environment etc. Further, a simple gesture refers to a collection of at most two body postures, consisting of muscle activation and/or limb motion only. Furthermore, a complex gesture refers to a collection of multiple body postures or sub-postures. The sub-postures detected are transmitted to the FES system. Subsequently, the FES system is triggered by the EMS (Electrical Muscle Stimulator) to move the hand of the patient.