I am working as a software programmer and my company does not have any projects right now, but there is one in the pipeline. It has been around for one month and I have been told to read the documents and understand the requirements. The requirements are not complete and clear since the project has not been confirmed yet. Frankly, since this is my first project of this kind, I have little fear but am confident of doing the project with my senior's guidance.

During the one month period, I would read the documents and understand things until I can perceive and then I will go procrastinate. It sometimes makes me sick because I need to act like working because of the visible work environment (anyone can see what I am doing). I don't have the motivation to go deeper since the project is not finalized. My manager has never asked me for any updates during the period.

I would go to my manager to tell him what I am doing and ask him about the project. He will say 'the project is still not confirmed, but you prepare yourself and anyway it is useful'.

Finally, my question is

"How to be productive in the buffer or grace periods of the project or work "?

When you are performing any activity, you are in one of these 8 mental states (top right states are where you be when you are productive)

I assume reading non-clear requirement of not-yet-confirmed project would be boring. So you are in boredom state. Add more challenges in the task and that you make you be more productive. One way of doing it is to do spikes (proof-of-concept) or build a prototype as @steve-v suggested.

Also take a break. Look around you. Find a way to make people around you be more productive. I introduced an ice-cream break and treat my colleagues with ice-creams once. Had a great time. :)

One great way is contribute to opensource project. You will get many things to learn in software engineer role.
You will see that how others write they code, how real projects are composed. And many more. These will open your vision and skills.