Sudden violent beating of the heart while sleeping may be caused by arrhythmia, hyperthyroidism, heart failure, cardiomyopathy and so on. You should go to the hospital in time to do ECG and other tests to treat the symptoms. 1. Arrhythmia: Arrhythmia, such as paroxysmal atrial fibrillation, paroxysmal atrial flutter, paroxysmal supraventricular tachycardia and so on, can appear in the sleep of the heart sudden violent beating, may be a sudden attack of the disease, it is recommended to consult a doctor in a timely manner, and active treatment. 2. Hyperthyroidism: caused by excessive secretion of thyroxine, it can manifest as irritability, panic, insomnia and other symptoms, and can also wake up suddenly during sleep with a violent heartbeat. To quit smoking, alcohol, appropriate rest, follow the doctor’s instructions standardized treatment. 3. Heart failure, cardiomyopathy: If the patient suffers from chronic heart failure or dilated cardiomyopathy, the gradual expansion of the heart can lead to gradual fibrosis of the myocardium, dysfunction of the cardiac conduction pathway, and a variety of cardiac arrhythmia, such as short-excursion ventricular tachycardia, short-excursion atrial tachycardia, and so on, and the heart can also suddenly and violently beat in the middle of sleep. In addition to the above, if the patient has fever, infection, anemia, ionic disorder, too much nervousness or work pressure, etc., the heart may also suddenly and violently beat during sleep, and it is recommended to carry out further examination and treatment under the guidance of the doctor according to the actual situation.