Melatonin is a neurohormone that ameliorates many health conditions when it is administered as a drug, but its drawbacks are its oral and intravenous fast release. To overcome the limitations associated with melatonin release, cyclodextrin-based nanosponges (CD-based NSs) can be used. Under their attractive properties, CD-based NSs are well-known to provide the sustained release of the drug. Green cyclodextrin (CD)-based molecularly imprinted nanosponges (MIP-NSs) are successfully synthesized by reacting β-Cyclodextrin (β-CD) or Methyl-β Cyclodextrin (M-βCD) with citric acid as a cross-linking agent at a 1:8 molar ratio, and melatonin is introduced as a template molecule. In addition, CD-based non-molecularly imprinted nanosponges (NIP-NSs) are synthesized following the same procedure as MIP-NSs without the presence of melatonin. The resulting polymers are characterized by CHNS-O Elemental, Fourier Transform Infrared Spectroscopy (FTIR), Thermogravimetric (TGA), Differential Scanning Calorimetry (DSC), Zeta Potential, and High-Performance Liquid Chromatography (HPLC-UV) analyses, etc. The encapsulation efficiencies are 60–90% for MIP-NSs and 20–40% for NIP-NSs, whereas melatonin loading capacities are 1–1.5% for MIP-NSs and 4–7% for NIP-NSs. A better-controlled drug release performance (pH = 7.4) for 24 h is displayed by the in vitro release study of MIP-NSs (30–50% released melatonin) than NIP-NSs (50–70% released melatonin) due to the different associations within the polymeric structure. Furthermore, a computational study, through the static simulations in the gas phase at a Geometry Frequency Non-covalent interactions (GFN2 level), is performed to support the inclusion complex between βCD and melatonin with the automatic energy exploration performed by Conformer-Rotamer Ensemble Sampling Tool (CREST). A total of 58% of the CD/melatonin interactions are dominated by weak forces. CD-based MIP-NSs and CD-based NIP-NSs are mixed with cream formulations for enhancing and sustaining the melatonin delivery into the skin. The efficiency of cream formulations is determined by stability, spreadability, viscosity, and pH. This development of a new skin formulation, based on an imprinting approach, will be of the utmost importance in future research at improving skin permeation through transdermal delivery, associated with narrow therapeutic windows or low bioavailability of drugs with various health benefits.