The Internet of Medical Things (IoMT) has transformed healthcare by connecting medical devices, sensors, and patients, significantly improving patient care. However, the sensitive data exchanged through IoMT is vulnerable to security attacks, raising serious privacy concerns. Traditional key sharing mechanisms are susceptible to compromise, posing risks to data integrity. This paper proposes a Timestamp-based Secret Key Generation (T-SKG) scheme for resource-constrained devices, generating a secret key at the patient's device and regenerating it at the doctor's device, thus eliminating direct key sharing and minimizing key compromise risks. Simulation results using MATLAB and Java demonstrate the T-SKG scheme's resilience against guessing, birthday, and brute force attacks. Specifically, there is only a 9 % chance of key compromise in a guessing attack if the attacker knows the key sequence pattern, while the scheme remains secure against brute force and birthday attacks within a specified timeframe. The T-SKG scheme is integrated into a healthcare framework to securely transmit health vitals collected using the MySignals sensor kit. For confidentiality, the Data Encryption Standard (DES) with various Cipher Block modes (ECB, CBC, CTR) is employed.