Stop using the coke a good two hours before you intend to try to sleep. If it's very good quality coke you'll be fine. If it's cut with caffeine, meth (unlikely) or other stimulants it's anyone's guess what it'll take to get you asleep. Time is probably the best bet in your situation. You could try 50-mg benadryl (diphenhydramine) or my preferred antihistamine for sleep doxylamine succinate.
Those are pretty weak, but with a good two hour wait (still socializing of course) and you may be ok. If you plan to leave the party in your designated driver's vehicle at 2AM, have you last line right at midnight.
That's my approach. But I usually have benzos. Maybe someone at the party will. Just be mindful of dosage, the benzo will likely last longer than the coke (that's the point), if you do score a benzo don't take it until you've stopped doing coke. Otherwise it is likely to be ineffective at sleep production unless it's wicked powerful benzo which I do not recommend with or after coke.
That's also general advice for others for tonight. I realize you (op) don't have benzos right now. A party with coke... someone's going to have landing gear, you just have to sniff it out. Ouch... Bad pun there.