Some of my best workouts have come when I got very little sleep (e.g. one arm chins 16 with L arm and 17 with R arm in one session). However, some of my worst sessions come with very little sleep. The majority of sessions if you're really exhausted it won't be a good workout though.
I would play it by feel mostly. Do you warmup and then see if you feel like working out:
1. If not, just focus on things like prehab/rehab and stretching because we can always use more of that.
2. If so, just bang out the workout if you're starting to feel good once you're warmed up.
If you're concerned about missing too many workouts (which is legitimate), plan to workout in the morning right after you've gotten enough rest from the 24 hour shift. Or whenever your other free time is...