The plane was flying from London to Singapore and had 467 passengers and 27 crew members on board.
The airline said that oxygen masks were deployed and the aircraft landed "uneventfully" at the Baku airport.
It said that none of the passengers or crew was injured and that it was investigating what caused the problem.
Nathan Phelps, an electrical supervisor from south Wales who was on the flight, told the BBC the plane was cruising at around 38,000 feet when it suddenly began to drop.
"I literally thought we were all going to die. There was no warning, the plane just went into a deep descent, the masks dropped and you automatically thought we were going to crash. There was no other rational thought really. You couldn't really look at it optimistically because you had never experienced anything like that before."
Singapore Airlines said a replacement plane to take the stranded passengers on to Singapore had now departed and was due to arrive in Baku on 7 January.
It said it had also sent staff from both Istanbul and Moscow to provide assistance on the ground in Baku.
Complaints
However, some customers writing on the airline's Facebook page complained about the wait for a replacement plane.
Passenger Terri Mann, said that she had to sleep on a "cold steel bench" with her 17-month old child, and that there were no "food places" at the airport.
"We are all a little hesitant about getting on our next legs of our journeys, just hope the worst is over," she wrote.
Another passenger Mark Franklin wrote that the handling of the incident was
"terrible".
No passengers or crew were injured
"It's not acceptable to not have even very basic refreshment or information for almost 500 people," he added.
In response to the complaints, Singapore Airlines issued a statement on Facebook apologising: "We sincerely apologise to affected