Agree with those who say drop the ephedra.
Nothing wrong with working out late, if its when you feel most comfortable working out. However, you are relying, nay, depending on ephedra to make it through a workout. This is not good. Some have suggested you take a sleep aid. This is also not good. You do NOT want to take an energy supplement and then try to counter it with sleep aid, you're going to severely mess with your body's chemistry. If you have kids, i'm going to assume you're married, so my advice is this: You're probably working out because you enjoy it, and to stay in moderately good shape. You don't need to have a Pro Bodybuilder-like workout every time you hit the gym. Remember why you go! Enjoy your workouts and keep them short and reasonable. Warm up with some light cardio and easy sets of whatever bodypart you're doing, thinking about the workout at hand. It is far more important to get your mind in the right place than it is to get your heart racing with ephedra. Also, you could try some green tea for less of an energy kick, but a positive and somewhat energetic feeling when hitting the gym. Great to keep you warm during the winter months, too.