This line appears only in the movie, while in the book there wasn't.
Another fact, this very line is different in every original language the film was translated to and it's always a proverb:
English
All work and no play makes Jack a dull boy.
German
Was Du heute kannst besorgen, das verschiebe nicht auf Morgen.
Meaning Don't put off until tomorrow what you can do today.
Italian
Il mattino ha l'oro in bocca.
Meaning The morning had gold in his mouth.
Spanish
No por mucho madrugar amanece más temprano.
Meaning Waking up earlier don't make the sun rise earlier.
French
Un «Tiens» vaut mieux que deux «Tu l'auras».
Meaning A «Take» is worth more than two «You will have».
Back to your main doubt
It's unclear if he writes these pages down on his own will or because he's manipulated by the Overlook and the evil inside it or simply because he's already nut; but the meaning is that he eventually went nuts and succumbs to the Overlook influence.