Attention Deficit Hyperactivity Disorder (ADHD) is a neurodevelopmental disorder that affects individuals across all age groups, from childhood through adulthood, and can significantly impact daily functioning. Early and accurate diagnosis of ADHD is crucial in clinical practice to ensure effective intervention and management, which can improve patient outcomes. However, traditional classification methods, while effective in many classification tasks, often struggle to achieve high accuracy in ADHD diagnosis. These limitations highlight the need for more sophisticated approaches. In response to this challenge, this paper introduces two innovative deep learning models specifically designed for ADHD classification using functional magnetic resonance imaging (fMRI). We propose an Optimized Temporal Denoised Convolutional Autoencoder (OTDCAE) framework, which utilizes resting-state fMRI (rs-fMRI) data to enhance diagnostic accuracy. The model combines a Denoising Autoencoder (DAE) for spatial feature extraction with an Optimal Temporal Convolutional Network (OTCN) for temporal sequence classification, resulting in robust performance even with a limited dataset. Here, for optimizing the hyper-parameters of the Temporal Convolutional Network (TCN), the optimizer Adaptive Osprey Algorithm (AOA) is presented and it is named as OTCN. To evaluate the effectiveness of our approach, we applied it to the widely-used ADHD-200 dataset. The results demonstrate the model's strong performance, achieving an impressive accuracy of 98.8% and an F-score of 98.5%, with 90% of the dataset used for training. These findings underscore the potential of deep learning techniques, particularly when applied to neuroimaging data, in advancing the accuracy and efficiency of ADHD diagnosis. Moreover, this research highlights the broader implications of integrating artificial intelligence (AI) into mental health assessments, offering promising avenues for future exploration and development in this field.