Funerary use, Coffin Flag Protocol.
The flag of the United States is used to drape the coffins of deceased veterans of the armed forces. When it is so used, the Union (white stars on blue background) is placed above the deceased's left shoulder.
I've never witnessed a burial at sea, not even a ceremonial one. As sailors, I believe most of us have, at one time or another, imagined ourselves being buried at sea. I once considered having my ashes tossed over the fantail of one of the navy ships I sailed on. However, I have outlived all of them, including one in which I was a Plank-Owner.