You don't add a comma before but in "I don't sleep at night but in the morning". But you should add a comma before but in "I don't sleep at night, but I sleep in the morning." The first one is a Compound Verb, and the second one is a clause. You need the comma before coordinating conjunctions + clause. You should not use a comma for the compound verb.
"I don't sleep at night but in the morning" is better than "I don't sleep at night, but I sleep in the morning." Because the former is more concise.