Its best to workout when you feel the most energy or you have the time. The point is too workout. Might be a good idea to workout early to have it done for that day or increase your metabolism for the day. length is also personal, i workout hard for 30 to 40 minutes. After 40min a lot of people lose there focus and concentration.
I usually do about 12 sets per workout so i can easily do that in less then 40min. Never workout over an hour in my opinion.