Background and Purpose: Fibromyalgia is a chronic pain syndrome associated with sleep disturbances, which may manifest as altered electroencephalography and electrocardiography (ECG) signal alterations during sleep. We aimed to develop a lightweight machine learning model for diagnosing fibromyalgia using single-lead ECG signals recorded during sleep. Materials and Methods: We analyzed 139 single-lead ECGs recorded during Stage 2 and Sleep Stage 3 of 16 patients with fibromyalgia and 16 age and sex matched controls. ECG records were divided into 15-second segments: 3308 and 1783 in healthy vs fibromyalgia classes, respectively. Our model comprised (1) feature extraction that combined an 8-wavelet filter and 4-level multiple filters-based multilevel discrete wavelet transform signal decomposition with a novel local binary pattern (LBP)-like function, 3LBP, that generated multiple patterns (analogous to quantum superposition) for feature map value extraction (the optimal inputspecific pattern was dynamically selected using a novel forward-forward algorithm); (2) feature selection using neighborhood component analysis and Chi-square functions; (3) classification with k-nearest neighbors and support vector machine classifiers using leave-one-record-out cross-validation; and ( 4) mode functionbased iterative majority voting to generate voted results, from which the best model result was derived. Results: Our model attained binary classification accuracies of 93.87% and 92.02% for Sleep Stage 2 and Sleep Stage 3, respectively. Conclusions: The results and findings clearly illustrate that our proposal distinguish the ECG of fibromyalgia patients from the healthy control patients. The model is self-organized and computationally lightweight, which should facilitate its clinical implementation. INDEX TERMS ECG-based fibromyalgia detection; 3LBP; multiple filters-based multilevel discrete wavelet transform; leave-one-record-out cross-validation; quantum-based feature extraction.