The half life of targeted sleep meds is typically around 12 hours of less, so in 24 hour very little is left to have any interactions with whatever you take the next night, provided you take a single drug, not a whole "cocktail". They should not be combined on the same night. Especially dangerous is the combination of opioids and benzos.
Heath Ledger died as the result of acute intoxication by the combined effects of oxycodone, hydrocodone, diazepam, temazepam, alprazolam and doxylamine. So he took quite a few meds at the same time from different classes, all suppressing breathing in a complementary way.