If you don't want "sleep" to run for 24 hours, I recommend using "at" to kill the program instead.
Think of "at" like "cron", but executing the command only once (instead of repeatedly).
So, the code is something like (haven't tested it, but should work):
command &; PID=$!; echo "kill $PID" | at now + 24 hours;