Married men can also cook. It is not prohibited for them to do so.
For example, see the following verses:
1 Arya men who are pure should cook offering to All-gods. 2 The cook
should refrain from speaking, coughing, or sneezing while facing the
food. 3 Should he touch his hair, body, or garment, he should wash
himself with water. 4 Alternatively, Sudra men under the supervision
of an Arya may do the cooking. 5 They are to follow the identical
procedure of sipping, 6 with the additional requirement that every day
they should shave the hair of their heads, bodies, and beards; clip
their nails; 7 and bathe with their clothes on. 8
Dharmasutras of Apasthambha 2.3.1-8
These all-god (or Viswadeva) offering being talked about here are to be done by householders.
On the eighth day off the month of Phalguna, one should himself, or
make his wife, cook vegetable-leaves. Where a Homa with
vegetable-leaves is to be performed, it must be done accordding to the
rules of an Ashtaka S'rdddha where sweet-barley-cakes [are offered],
Katyayana Smriti, Chapter 17, Verse 23.
However, generally it is regarded as the wife's duty to cook.
Pure in her thought, speech and action, and obedient to the dictates
of her lord, she should follow him (in life) like his own shadow, seek
his good like a trusted friend, and minister /to his desires like a
servant. 26 27)
Then having finished cooking, she should report of it to her husband saying, " the rice is cooked." The husband having made
offerings therewith to the Vishvadevas, she should first feed the
children, and ithen serve out the morning meal to her lord. (28)
Vyasa Smriti, Chapter 2, Verses 26-28.