Postoperative atrial fibrillation can occur in 25% to 40% of patients undergoing cardiothoracic surgery. Although the majority of postoperative atrial fibrillation is benign, it has been associated with prolonged hospital length of stay. Magnesium prophylaxis against postoperative atrial fibrillation has been evaluated in several clinical trials; however these trials were small in size and therefore conveyed mixed or inconclusive results