A 'wink' has meant a short sleep since the 1300s, although the more specific '40 winks' did not appear until about half a millennium later.
I've always assumed that the 40 refers to minutes on the basis that a nap shorter than that is not truly refreshing and one that's much longer just leaves you 'wrecked' for hours!