1. While I was cooking, he cleaned the room.

2. While I cooked, he cleaned the room.

3. While I was cooking, he was cleaning the room.

----------------------------
Are they all grammatical? Which one is commonly used?

Yes, all are correct. #1 is probably most commonly used.

Yes, all of the provided sentences are grammatically correct.

However, the commonly used sentence would depend on the context and the emphasis you want to give. Let's break down each sentence:

1. "While I was cooking, he cleaned the room." This sentence implies that the action of cleaning the room took place at the same time as your cooking. It suggests that both actions were happening simultaneously. This structure is commonly used when two actions are happening in parallel.

2. "While I cooked, he cleaned the room." This sentence suggests that the cleaning of the room occurred during the entire duration of your cooking. It does not necessarily imply that the actions were happening at the exact same time. This structure is commonly used to describe one action or event that took place within the timeframe of another action.

3. "While I was cooking, he was cleaning the room." This sentence emphasizes that both actions were happening simultaneously. The continuous tense in both clauses indicates that both actions were ongoing and happened at the same time. This structure is often used when describing two ongoing actions that took place concurrently.

So, the commonly used sentence would depend on the precise meaning and emphasis you want to convey based on the context of the situation.