The story depicted in the panel is that of the 4th-century saint, Nicholas of Myra. Under cover of darkness, Saint Nicholas throws three golden balls through the window of the house of an impoverished nobleman. (Golden balls were often used by artists to represent the purses of the gold mentioned in the saint’s legend.)
According to the legend, the nobleman had been faced with the prospect of selling his girls into prostitution. The saint’s act of charity saved them from this fate, providing dowries for the three daughters who were duly married. The story gradually evolved into the Christmas tradition of Santa Claus.
The shape and sturdy structure of the panel suggest that the picture may have been a 'spalliera', a decorative painting set into a piece of furniture or incorporated into the panelled walls of a camera, a room that functioned as a bed-chamber and reception room.
The subject matter is well suited to such a purpose, since the picture both depicts a bedchamber (rather better furnished than the nobleman's straitened circumstances might suggest) and evokes the theme of sleep, in an inventive variety of poses.