The word arrhythmia means irregular heartbeat. Heart beats are controlled by the autonomic nervous system. Cardiac arrhythmias are fairly common and often benign. When they happen during sleep, in association with sleep-disordered breathing, there is cause for concern.
During REM sleep it is perfectly natural and common for the heart to "miss a beat" for a couple seconds. Such misses only reflect the shifting of gears by the body (known as changes in autonomic tone in medical jargon). This condition is also called bradyarrhythmia syndrome or brady-arrhythmia syndrome. REM sleep is also a period of increased risk (however small) for myocardial ischemia.
However, if cardiac arrhythmia occurs primarily due to breathing disorders during sleep then it might become serious and may lead to even death due to congestive heart failure or sudden infant death.
Cardiac arrhythmia usually disappears when sleep-disordered breathing is controlled.
The symptoms of obstructive sleep apnea (OSA) are loud snoring during the night and drowsiness during the day. About half of those with OSA have high blood pressure. Usually fat men with thick necks who sleep on their backs are those who snore the loudest and are susceptible to OSA. Heavy snoring is associated with increased risk of sudden death during sleep.
The most common way to manage OSA is putting on a breathing mask to maintain a consistent air pressure in the nasal channel. This device is known as Continuous Positive Airway Pressure (CPAP) machine. If the heart still beats irregularly during sleep then the reason might be related to impairments of the cardiovascular system and may not have any connection with sleep at all.