Tools used by clinicians to diagnose and treat insomnia typically include sleep diaries and questionnaires. Overnight polysomnography (PSG) recordings are used when the initial diagnosis is uncertain due to the presence of other sleep disorders or when the treatment, either behavioral or pharmacologic, is unsuccessful. However, the analysis and the scoring of PSG data are time-consuming. To simplify the diagnosis process, in this paper we have proposed an efficient insomnia detection algorithm based on a central single electroencephalographic (EEG) channel (C3) using only deep sleep. We also analyzed several spectral and statistical EEG features of good sleeper controls and subjects suffering from insomnia in different sleep stages to identify the features that offered the best discrimination between the two groups. Our proposed algorithm was evaluated using EEG recordings from 19 patients diagnosed with primary insomnia (11 females, 8 males) and 16 matched control subjects (11 females, 5 males). The sensitivity of our algorithm is 92%, the specificity is 89.9%, the Cohen's kappa is 0.81 and the agreement is 91%, indicating the effectiveness of our proposed method.