If you are interested in using the Brainstorm viewer for sleep staging:
https://neuroimage.usc.edu/brainstorm/Tutorials/EventMarkers#Custom_shortcuts
To make screen captures with all the properties you need, you can write a script that scans all the file:
% Open viewer
hFig = view_timeseries(RawFile);
% Get file duration
DataMat = in_bst_data(RawFile);
WinLength = 30;
nWin = floor(DataMat.Time(end) / WinLength);
% Get figure references
[~, iFig, iDS] = bst_figures('GetFigure', hFig);
% Configure window
figure_timeseries('SetDisplayMode', hFig, 'column');
figure_timeseries('SetResolution', iDS, iFig, 400, 50); % Note that the time resolution depends on the size of the window
% panel_record('SetTimeLength', WinLength); % Useless if defining resolution
% Loop on windows
for iWin = 1:nWin
startTime = (iWin - 1) * WinLength;
panel_record('SetStartTime', startTime);
imgDir = './';
out_figure_image(hFig, bst_fullfile(imgDir, sprintf('img_%04d.jpg', iWin)));
% YOu can use different file formats: TIF, PNG, GIF...
end
% Close window
close(hFig);