Why don't you do the exactly opposite which is my practice in my regular life. Whenever I am assigned for a task, then I give full effort at the beginning and try to complete the task many days ago of deadline. And at the time of deadline, I take rest by saying my top management that I completed the task in advance. In this case, they are also happy and I am also happy because of avoiding the load of last days.
I have followed same strategy during studying in my university and working in different software companies. So according to my understanding, the way I follow is much better and safe way. Try to follow this.