Any depressant will affect your performance in a bad way. Depending what/how much you take you might be able to overcome it. But you will be at a disadvantage. But very poor sleep the night before is even worse.
If you must then try to find something with the shortest half life possible, and take the lowest effective dose (and do everything else right, of course).
Hard physical activity will effectively accelerate your metabolism and deleterious effects of Rx with it, however, so long and/or late day races are better than early and short ones.