I think that was more about trying, in a dumb way, to make the pregnant woman not work all night than sexual harassment.
The author was 8 months pregnant and was going to stay up for 12 hours doing stuff. This seemed more like a commanding boss trying to stop a workaholic from working.
Demanding that she sleep next to her on her bed does not sound like trying to stop a workaholic from working. It sounds creepy as hell.