The Palace gave no details on what had prompted such medical attention.
A royal source said the queen had stayed at the King Edward VII hospital in central London for practical reasons and that her medical team had taken a cautious approach.
Elizabeth, who is queen of 15 other realms including Australia, Canada and New Zealand, returned to her desk for work on Thursday afternoon and was undertaking some light duties, the source said.
Elizabeth, who acceded to the throne as Britain was shedding its imperial power, has symbolised stability for generations of British people, building the popularity of the monarchy despite seismic political, social and cultural changes that threatened to make it an anachronism.
A quiet and uncomplaining dedication to duty, even in old age, has earned her widespread respect in Britain and abroad, even from republicans who are eager for the monarchy to be abolished.
Elizabeth spent Tuesday night hosting a drinks reception at Windsor for billionaire business leaders including Bill Gates after Prime Minister Boris Johnson convened a green investment conference ahead of the COP26 climate summit.
Elizabeth, along with her son and heir Prince Charles, 72, and grandson Prince William, 39, greeted guests including U.S. climate envoy John Kerry without masks.
The queen, wearing a teal skirt and jacket with pearls, was photographed beside Johnson, smiling and chatting with business leaders.
The head of state, who next year celebrates 70 years on the throne, is known for her robust health. The last time she is thought to have spent a night in hospital was in 2013 when she was suffering from symptoms of gastroenteritis.
She had a successful surgery to treat an eye cataract in 2018 and a knee operation in 2003, but royal officials are loathe to discuss health issues in general.
Prince Philip, her husband of more than seven decades, died in April aged 99.
That has not stopped her from carrying out her official engagements, although her age has meant she has handed more duties to Charles and other members of the royal family.
She was this month seen using a walking stick for support in public for the first time, apart from after her knee operation.
Not only has she lost her husband, who she described as her "strength and stay", but her second son Prince Andrew has quit royal duties over his links to U.S. financier Jeffrey Epstein, a registered sex offender who killed himself in a Manhattan jail in 2019.
Her grandson Prince Harry and his American wife Meghan have also stepped away from royal duties to move to Los Angeles from where they delivered some barbed attacks on Buckingham Palace.
Elizabeth's next major engagement is at the end of the month when she is due to welcome world leaders at the opening of COP26 in Glasgow.
(Reporting by Michael Holden; Editing by Guy Faulconbridge, Daniel Wallis and Rosalba O'Brien) ((email@example.com, Twitter: @rosalbaob; +1-646-988-3014;))