Electrograms (EGM) recorded from the surface of the myocardium are becoming more and more accessible. T-wave alternans (TWA) is associated with increased vulnerability to ventricular tachycardia/fibrillation and it occurs before the onset of ventricular arrhythmias. Thus, accurate methodologies for time-varying alternans estimation/detection in EGM are needed. In this paper, we perform a simulation study based on epicardial EGM recorded in vivo in humans to compare the accuracy of four methodologies: the spectral method (SM), modified moving average method, laplacian likelihood ratio method (LLR), and a novel method based on time-frequency distributions. A variety of effects are considered, which include the presence of wide band noise, respiration, and impulse artifacts. We found that 1) EGM-TWA can be detected accurately when the standard deviation of wide-band noise is equal or smaller than ten times the magnitude of EGM-TWA. 2) Respiration can be critical for EGM-TWA analysis, even at typical respiratory rates. 3) Impulse noise strongly reduces the accuracy of all methods, except LLR. 4) If depolarization time is used as a fiducial point, the localization of the T-wave is not critical for the accuracy of EGM-TWA detection. 5) According to this study, all methodologies provided accurate EGM-TWA detection/quantification in ideal conditions, while LLR was the most robust, providing better detection-rates in noisy conditions. Application on epicardial mapping of the in vivo human heart shows that EGM-TWA has heterogeneous spatio-temporal distribution.