Objective Insomnia is a common sleep disorder that affects many adults either transiently or chronically. This study aimed to establish whether there is a relationship between the electroencephalographic (EEG) spectral analysis and salivary cortisol levels in insomnia and compared to healthy controls. Materials and methods This case-control study included 15 insomnia patients and 15 healthy control subjects. Insomnia was determined according to the International Classification of Headache Disorders III diagnostic criteria. The EEG data were collected and processed with MATLAB software. Blood and salivary samples were taken for hematological and biochemical measurements. Salivary cortisol levels were calculated and compared statistically with the healthy group. Results The mean age of the patients was 46.5 +/- 11 years. The salivary cortisol levels at 18:00 and 24:00 were found higher in the insomnia than in the healthy subjects (respectively, 0.12 (0.11) mu g/dl, 0.07 (0.02) mu g/dl). But this difference was not statistically significant (p > 0.05). No significant difference was observed in the spectral analysis of patients between the frontal, central, and occipital channel (p > 0.05). However, in the correlation between the frontal channel spectral analysis and at the 24:00 salivary cortisol of patient and control group, DeltaGmax (p = 0.002), DeltaGmean (p = 0.019) and, in the correlation with 18:00 salivary cortisol DeltaGmax (p = 0.010), were positively correlated. Conclusion In this study, no significant difference was found in spectral analysis and salivary cortisol levels in insomnia patients, but at 18:00 and 24:00, cortisol levels were correlated positively with theta and delta waves in EEG spectral analysis in some channels.