I had my referees sign their declarations about 10 days before I submitted my citizenship application. However, after I submitted it, I noticed that they asked for referee declarations in a separate section again and it occurred to me that maybe the referees have to sign the declarations after you've submitted your application because on the declarations it also says "to the best of my knowledge, the details of the applicant given in this application are correct". That presumably can only be confirmed after the application has been submitted so that nothing on it is changed. Here's the
link to the referee declaration.