The monitoring of sleeping conditions is of major importance for various reasons such as the detection and treatment of sleep disorders, the assessment of the effect of various medical medications or smart devices on the sleep quality. Besides, breath sound contains important information, therefore analysis and collection of breath sound has become an important research field. In this paper, we propose a simple method to obtain breath sound signal using a support vector machine (SVM) to automatically analyze the breath sound signal and recognize sleep state. It only measures all-night breath sound, without disrupting the participant's normal sleep and it can be used both at home, or in a hotel with minimal cost. The SVM kernel function was chosen to be the RBF (Radial Basis Function) and kernel parameters were varied to examine the effectiveness of optimization methods. The high detection accuracy results validate the performance of the proposed method.