In an earlier statement, Osaka said she did not want her stance to become a distraction and said that she had been dealing with mental health issues since 2018.
Williams, 39, was inevitably asked for her reaction to Osaka's decision following her first-round win over Romanian Irina-Camelia Begu.
"The only thing I feel is that I feel for Naomi. I feel like I wish I could give her a hug because I know what it's like. Like I said, I've been in those positions.
"We have different personalities, and people are different. Not everyone is the same. I'm thick (skinned). Other people are thin. Everyone is different and everyone handles things differently."