He dies, and Horatio, his closest friend; provides a suitably poignant farewell: “Good night, sweet prince, and flights of angels sing thee to thy rest”.”
In his act 3 soliloquy, Hamlet compared death to sleep, and feared “what dreams may come.” Horatio also uses sleep imagery here, wishing Hamlet “good night,” protected by angels, expressing the hope that Hamlet may now be at peace, now that his conflict with Claudius has ended.