Yes, it's even better than the original one. Your original one is a bit ambiguous, because we're not sure without context whether "this morning" indicates the present or the past. If past, it should be: "If we hadn't spent all night studying, we wouldn't have been so tired this moring."