"Nearer, My God, to Thee" is a hymn with lyrics by Sarah Flower Adams. It can be sung to different melodies, but the most common tune used is called "Bethany" which was composed by Lowell Mason (the same composer who wrote the tune for "Joy to the World"). Some survivors from the Titanic disaster reported that the ship's musicians played this hymn as the ship sunk. Whether or not this was true, it made a poignant moment in the movie when the String Quartet decided to play on while the disaster unfolded around them.
Piano sheet music, with midi and mp3 files for this hymn can be downloaded using the links in the left-hand menu.
Here is a video of Nearer My God to Thee (Tune: Bethany):
The audio controls below allow you to play the mp3 version of Nearer My God to Thee (Tune: Bethany) or you can download the MP3 file. You can also download the midi version of Nearer My God to Thee (Tune: Bethany).
The image below is the first page of the sheet music, and here you can download the full sheet music for Nearer My God to Thee (Tune: Bethany) in PDF format.