Background/objective: Deep learning paradigm is very popular for image classification problems and has proven its significance in all domains. The tuning of hyperparameter for deep neural network algorithm is a very tedious task and is performed mostly in the trial-and-error method. We propose a Bayesian optimization algorithm (BOA) to tune hyperparameter in pre-trained GooLeNet architecture to detect sleep breathing disorders using single-lead ECG. We aim to perform automatic detection of sleep apnea using single-lead ECG rather than polysomnography as it is easy to record and implement. Method: The physionet sleep apnea data is used for training and testing of the model proposed. Three different solvers adam, rmsprop, and sgdm are used in pre-trained GoogLeNet architecture for the classification of sleep breathing disorder using single-lead ECG while rest all other hyperparameters are altered too. Result: To detect automatic sleep breathing disorder (SBD) in BOA using pre-trained GoogLeNet and solvers adam, rmsprop, and sgdm the sgdm optimizer is showing the best result as the loss is least in this case but processing times for each are different. Discussion/conclusion: We conclude that the BOA was used to identify the most suitable classifier for the automatic detection of SBD.