With the expeditious progression of the Internet of Things (IoT), there is a growing need for robust connectivity solutions that can accommodate the increasing number of cell-edge users. These users often need help with the inferior signal quality compared to those at the cell centre. The User-Pairing NOMA (UPNOMA) system that integrates the Spatial Modulation (SM) with Non-Orthogonal Multiple Access (NOMA) named SM-UPNOMA enhanced the IoT connectivity and spectral efficiency in networks dominated by cell-edge users. However, the optimal time slots and bandwidth between the paired users are remarkable in obtaining these advantages. Hence, a novel Crayfish Optimized SM-UPNOMA (COSU) system that aims for optimal allocation of time and bandwidth. It offers two distinct variants: Time-sharing SM-UPNOMA (TSM-UPNOMA) and bandwidth-sharing SM-UPNOMA (BSM-UPNOMA). The designed method is meticulously crafted to optimize bit error rate (BER) performance and maximize the sum rate, effectively addressing the challenges of high spectral efficiency in dense cell-edge environments. The advantages of the proposed systems are manifold, including improved spectral efficiency and enhanced BER performance even under less-than-ideal successive interference cancellation (ISIC) conditions. By leveraging spatial modulation, the system effectively utilizes the spatial domain as an additional multiplexing dimension, enabling support for more users without significantly increasing complexity. This research focuses on wireless communication systems, specifically advanced signal processing techniques for Next-Generation Networks (NGNs). Through extensive simulations, this paper demonstrates the superior performance of SM-UPNOMA systems compared to conventional NOMA (C-NOMA), SM-aided conventional NOMA (SM-CNOMA), and SM-aided OMA (SM-OMA). Furthermore, the analytical verification of the BER performance for TSM-UPNOMA provides practical validation for the proposed model.