Is it a heart problem if you shake violently in your sleep?

Jerking while sleeping is not caused by heart problems. Shaking violently while sleeping may be a physiological muscle spasm, which usually occurs when you have just fallen asleep; the cerebral cortex is still in a relative state of excitement, and the motor nerves sometimes send out motor signals to the muscles, so it is manifested as shaking violently. Common symptoms of heart problems include panic, palpitations, dyspnea, chest tightness, chest pain, and swelling of the limbs in some patients; so shaking violently during sleep is not caused by heart problems. If the shaking during sleep is particularly frequent and has affected normal sleep, it is recommended to go to the Neurology Department of the hospital for examination to rule out the possibility of epilepsy and other diseases; those who need it should cooperate with the treatment under the guidance of the doctor.