der Pyjama
pajamas
A comfortable, usually two-piece item of clothing consisting of pants and a top, worn for sleeping.
Am Sonntag bleibe ich gerne den ganzen Vormittag im Pyjama.
On Sundays, I like to stay in my pajamas all morning.

pajamas
Loading your saved state.
pajamas
A comfortable, usually two-piece item of clothing consisting of pants and a top, worn for sleeping.
Am Sonntag bleibe ich gerne den ganzen Vormittag im Pyjama.
On Sundays, I like to stay in my pajamas all morning.

Although a Pyjama (pajamas) usually consists of two pieces, the word is used in German as a countable noun in the singular. You speak of 'einem Pyjama' (one pair/set of pajamas) when you mean a set consisting of pants and a top.
Ich muss mir einen neuen Pyjama kaufen, meiner ist schon alt.
I need to buy myself a new pair of pajamas; mine are already old.
The expression 'im Pyjama sein' (to be in pajamas) or 'im Pyjama bleiben' (to stay in pajamas) is used very frequently. It describes wearing sleepwear, often in the context of relaxing on the weekend or being sick.
Er war krank und verbrachte den ganzen Tag im Pyjama auf dem Sofa.
He was sick and spent the whole day on the sofa in his pajamas.
As with other clothing, 'Pyjama' (pajamas) is often combined with the verbs 'anziehen' (to put on), 'ausziehen' (to take off), and 'tragen' (to wear).
Vor dem Schlafengehen zieht er immer seinen bequemsten Pyjama an.
Before going to bed, he always puts on his most comfortable pajamas.
pajamas
'der Schlafanzug' and 'der Pyjama' mean almost the same thing in everyday language: comfortable clothing for sleeping, usually with pants and a top. 'Schlafanzug' is a German word and describes the function very directly. 'Pyjama' is also very common and sounds a little more international. Learners can easily confuse the words because both fit in the same situations. In most conversations, you can use either word.

Er sitzt am Sonntagmorgen noch im Pyjama am Frühstückstisch.
On Sunday morning, he is still sitting at the breakfast table in his pajamas.
Zu Hause zieht sich das Kind sofort seinen Schlafanzug an.
At home, the child immediately puts on his pajamas.