 The song was initially offered to recording artist Teyana Taylor, although Berry found it more suitable for Beyoncé.However, Taylor did not record the song and Berry was invited to a studio with another songwriter called Midian Mathers, who cried upon hearing "Sandcastles".Berry, Mathers and Yusef further worked on the song, with Mathers singing it as a demo.