Knowing that most students submit assignments right around the deadline, is it advisable not to set deadline that is very late at night? Like many on this site, I use a Moodle-type online Content Management System to give assignments to my students, and receive the finished work for grading. This is in a traditional context where the students are physically present in the classroom, and the online part is seen as a simple tool to be used in addition to the classic paper-based route. Students' first class for the day usually begins at 8 a.m.   

For the last few years, I put the deadline for assignment acceptance at midnight, with plenty of time (2-3 weeks) to do the work, so each student can handle his/her workload as they wish. These are young adults aged 18-25, and are in theory very much responsible for their acts. Observation gives us actual hand-in times with approximately the following distribution:


1-2 days before deadline: 5%
3-24 hours before: 10%
1-2 hours: 10%
less than 1 hour: 65%
emails in distress after the deadline has expired saying they have encountered a computer glitch or some other excuse: 10%


Which I guess is about par for the course. :-( 

So it is clear that while in theory these students are responsible young adults, in practice they tend to plan ahead in a less than stellar way. The impression that is perceived is that the online nature of the submission system makes students take slightly more liberties with deadlines than when assignments had to be handed in, in a face-to-face situation - although it is clear that even then there will always be a certain percentage of people with difficulties respecting deadlines.

OK, here is the question: without getting into considerations on whether students should plan better (and possible ways in which I and other teachers could help them do so), would changing deadline times from midnight to, for example, 10 p.m. be a good move from the standpoint of their getting enough sleep (moral considerations welcome) and actually attending class at the beginning of the next day? Do I get to patent this Great Idea?

No, that last bit was a joke. ;-)

Reactions from people who are not actually teachers, but have experienced this context as a student are also welcome.

Update

I have ended up accepting the answer by Superbest below, basically because I liked his discussion of alternative possibilities. This is a bit subjective, since many other answers are also of very high quality IMHO - and I would certainly encourage the reader to peruse all the answers given here, and the varying points of view expressed (also in comments). Much appreciated.
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.