Atrial fibrillation occurs due to electrical triggers in the heart that can become active and fire electricity. This can occur due to a variety of reasons. Many times, there is no explanation for this electrical firing. However, other times a specific reason can be identified. These include heart attack, heart failure, lung disease, sleep apnea, thyroid disease, infection, alcohol use, and recreational drug use.