These sound like two books by Mary Norton: The Magic Bedknob; or, How to Become a Witch in Ten Easy Lessons (1943); and Bonfires and Broomsticks (1947) by English children's author Mary Norton.
These books served as the basis for the Oscar-winning Walt Disney film Bedknobs and Broomsticks, released in 1971. From the Wikipedia article about the film:
During the Blitz, three orphaned children named Charlie, Carrie, and Paul Rawlins are evacuated from London to Pepperinge Eye, where they are placed in the reluctant care of Miss Eglantine Price, who agrees to the arrangement temporarily. The children attempt to run back to London, but after observing Miss Price attempting to fly on a broomstick, they change their minds. Miss Price reveals she is learning witchcraft through a correspondence school with hopes of using her spells in the British war effort, and offers the children a transportation spell in exchange for their silence. She casts the spell on a bedknob, and adds only Paul can work the spell, as he is the one who handed the bedknob to her. Later, Miss Price receives a letter from her school announcing its closure, thus preventing her from learning the final spell. She convinces Paul to use the enchanted bed to return the group to London, and locate Professor Emelius Browne.