Knowing that most students submit assignments right around the deadline, is it advisable not to set deadline that is very late at night?
First of all, I think the distribution that you're seeing is not very unusual, and indeed looks very similar to the distribution of times that I see coming from mature scientists submitting conference papers and grants.

It is simply that people, including your students, tend to overcommit themselves and to underestimate the difficulty of work. When that is combined with tasks on which there is a flexible amount of effort that can be invested (e.g., quality of work on an assignment), it is generally the case that "this work is done" is an ill-defined notion, and instead it gets triaged at some point of time shortly before the assignment.  Better and more prepared students (or whoever) simply climb farther up in quality before triaging.

Given that, I generally advocate for a policy of "tight deadlines, lots of mercy."  That means setting the deadline slightly before when you really want the assignment turned in, and then being very liberal about accepting requests for extension up until your secret "real deadline."

Addressing your specific question about timing, I think that if you want your students to get more sleep, moving the deadline up a couple of hours is a totally reasonable tactic: given the phenomena at work, it is unlikely to affect the distribution or quality of the assignments you receive.  Depending on how your automated system works, you may also be able to explicitly support an official deadline of 10pm, with the de facto ability to leave the submission system open longer to receive the main tranche of "just a little bit late" assignments.