Miley was hospitalised with tonsillitis on Tuesday and Gold Coast-born Cody, 22, who she referred to as her "boyfriend", came to visit her with roses and his guitar so he could play the love song he wrote for her.
"Suddenly I am feeling so much better," she captioned a shot of her and Cody lying together on her hospital bed.
"The sweetest guy came to visit at the hospital and sang the sweetest song he wrote just for me."
"Singing something I wrote for my golden thing while she is sick in hospital," Cody captioned a clip he posted on his Instagram.
The high-profile split has led to multiple comments, with Spencer Pratt being the latest star to open his mouth.
Spencer, who never misses an opportunity to roast Miley, decided to inject his opinion, cheekily commenting: "Yah Kaitlynn def couldn't do that."
This isn't the only time Spencer's refused to hold his tongue. Speaking to Cosmopolitan last month, Spencer implied Kaitlynn and Miley had an "emotional" relationship long before the "Mother's Daughter" singer and her husband of eight months, Liam, called it quits.
“It’s tough for me to listen to Kaitlynn complain about people talking about her allegedly open relationship with Brody when we know she had a thing going with Miley," the controversial star began.
"She already had something going on with her when these scenes were filming — maybe not physically, but definitely emotionally," he said, referring No one’s judging you for whatever it is you and Brody do when he’s not sleeping in his car. We just don’t want people to lie about their lives.”
WATCH: Miley Cyrus caught in steamy make out session with Cody Simpson