The longest UNSC meeting that I'm aware of is the 6411th meeting which took place in October 2010 on the topic of 'Women and peace and security'. It lasted from 10:10 a.m. to 10:20 p.m., a duration of just over 12 hours. This is followed by the 6917th meeting, on the topic of 'Protection of civilians in armed conflict', which lasted from 11.05 a.m. until 10:20 p.m., a duration of around 11 hours.
Many UNSC meetings have taken place through the night, the most recent that I'm aware of being the 7225th meeting, which lasted just 10 minutes, but started at midnight. There were also a fair number in 1990, on the topic of Iraq & Kuwait, which took place during the night, in particular, the 2932nd, 2937th, 2938th, 2939th, and 2940th sessions, but none lasted longer than three hours.
A good example of a marathon session taking place through the night came in 2002; the 4503rd meeting, on the topic of 'The situation in the Middle East, including the Palestinian question' lasted from 6 p.m. on Friday March 29th through the night until it rose at 4.40 a.m., a duration of 10 hours 40 minutes.