We have developed a low-cost, real-time sleep apnea monitoring system ''Apnea MedAssist" for recognizing obstructive sleep apnea episodes with a high degree of accuracy for both home and clinical care applications. The fully automated system uses patient's single channel nocturnal ECG to extract feature sets, and uses the support vector classifier (SVC) to detect apnea episodes. "Apnea MedAssist" is implemented on Android operating system (OS) based smartphones, uses either the general adult subject-independent SVC model or subject-dependent SVC model, and achieves a classification F-measure of 90% and a sensitivity of 96% for the subject-independent SVC. The real-time capability comes from the use of 1-min segments of ECG epochs for feature extraction and classification. The reduced complexity of "Apnea MedAssist" comes from efficient optimization of the ECG processing, and use of techniques to reduce SVC model complexity by reducing the dimension of feature set from ECG and ECG-derived respiration signals and by reducing the number of support vectors.