Used to run into this problem a lot, and our DBAs had what they called "the kickout script" that they ran on the database, which in our case was SQL Server 2005/2008. Basically, you are killing all connections to the database, which boots out your users, which in turn releases the locks. We had to do this in order to run nightly updates on SDE featureclasses.
I'm not going to include any SQL here, as there are many ways to accomplish this. If you have a DBA (or know one), get with them, they should be able to help. For examples, here is a post on DBA.se for SQL Server and here is one on SO regarding Oracle. I'm including those two database flavors as they seem to be the most common out there for SDE.
You can then wrap up the SQL into a stored procedure and schedule the script to be run using something such as
sqlcmd for SQL Server:
sqlcmd -S <machine_name> -E -d <database> -Q "exec <stored_procedure>"