A couple of years ago my 1 year old was not sleeping at all. She had a very severe chest infection with no gag reflex so would be up vomiting throughout the night once she was laid on her back and started coughing. It was a cycle of finally get to sleep, be woken up to the sound of vomiting, change her clothes and the towels around her bed, settle her, repeat.
She finally was prescribed an inhaler and things got better, but for a good 4 months straight that's what my nights looked like and me and dh were both working full time.
I remember my colleagues were always asking why I looked so tired. Most were young and childless and couldn't really get it. I could be snappy at work and got a lot of bad reviews that year because of a bad temper. I also got promoted though, and I don't know if I would have if I'd asked for four months unpaid leave until my dd got better. It was a horrible time though. I had taken more time of sick than usual anyway because since I was so exhausted, I was picking up every bug under the sun. A lot of d&v bugs came home from my dds nursery.
One night I was doing the usual routine with dd before a big presentation the next morning. I noticed my junior colleague had sent me a text around 9pm about getting a taxi to the location in the morning. By the time I read it, it was 4am and I was up anyway so I managed to organize the taxi and text her the details.
In the cab on the way there the next morning my colleague asked me what I was doing up at 4am. I explained it was just the usual night drama with dd that happens every night. It was like I saw the penny drop right in front of me. Here she was after an amazing night sleep trying to prepare for this important presentation and for me it was just now my life that I would have zero sleep and still rock up the next day and have to perform.
So I think as a colleague you should try to understand accept the reality of the situation. If someone comes into work with a constant lack of sleep, they're going to be ratty at best, unable to perform at their worst. Do you want that colleague working beside you? In my case I didn't have the energy for peoples bullshit work problems and vocalized that and it was reflected in my reviews. But I could still perform well for the big things and that was recognized too.
If colleagues are expecting someone not to sleep and stroll in like employee of the month then they are being unreasonable. If that is the kind of environment, then the colleague should just call in sick. They can't just take a magic potion to erase the night before.