Commonly sleep stages detection can be done using electroencephalogram (EEG) that is recorded in hospitals using Polysomnography (PSG) systems. PSG not only records brain signal but also electrocardiogram (ECG). In this paper an automatic sleep stages detection using FNGLVQ algorithm based solely on ECG signal is reported. We have compared two neural network algorithms' accuracies and implemented algorithms with the best accuracies into Field Programmable Gate Array. The two algorithms were Generalized Learning Vector Quantization (GLVQ) and Fuzzy Neuro Generalized Learning Vector Quantization (FNGLVQ). The result shows that FNGLVQ is capable in achieving 68% accuracy for MIT-BIH data, and 70% accuracy for Mitra data. The experiment conducted on FPGA also shows similar result.