OP asks:
> What is the syntacti[c]al function of the word translated as "sleep"? Is sleep the time (or metaphorically the mode) of giving, or is it the gift itself?

I think this is an excellent question. Unfortunately (as expected given the variety of translations), I think there is ambiguity in the original which will preclude drawing a certain conclusion, but I can at least explain the problem. The text:

>  שָׁ֤וְא לָכֶ֨ם  
> It is vain for you  
>   מַשְׁכִּ֪ימֵי ק֡וּם  
to rise early  
 מְאַֽחֲרֵי־שֶׁ֗בֶת  
to sit up late  
 אֹ֭כְלֵי לֶ֣חֶם הָעֲצָבִ֑ים  
eating of the bread of sorrows  
 כֵּ֤ן יִתֵּ֖ן לִֽידִיד֣וֹ שֵׁנָֽא  
for he gives (/will give) to his beloved **sleep**. 

The problem with this literal translation is that in English, the word "sleep" unambiguously the object of the verb נתן = to give. In Hebrew, like in English, objects often follow verbs, and an English direct object may be the most straightforward translation. However, there is another possibility in the Hebrew that is not represented by this English.

The ambiguity arises due to the existence of the "adverbial accusative" in Hebrew. That is, a noun in the accusative (i.e. object) position can function as an adverb.<sup>1</sup>  Walke & O'Connor<sup>2</sup>  tell us that such constructions

> detail features of the verbal action (and the like), including time, place, condition, manner, and specification.

"Sleep" then could mean "as they sleep" or "during sleep" or some such thing. So the (OP's English translation of the) German rendering 

> because he gives to his (chosen) in their sleep

is also plausible from the Hebrew. 

Incidentally, [another answer][aa] pointed out that the word "ὕπνον" ("sleep") is in the accusative in the Greek text. While this is true, Greek also does know of an adverbial accusative, more prevalent in older forms of Greek compared to Koine, but not infrequent in Septuagint Koine, as one might expect from the source language.<sup>3</sup> The Greek Psalms also follow the Hebrew syntax rather slavishly, so I'm not sure how much we can draw from the Greek accusative.<sup>4</sup> 

The OP also asked about the tense of "giving" in Hebrew -- this is "imperfective". Hebrew is largely an aspectual rather than a tense-based language, a topic which I am not competent to expound on further, but the basic idea is "incompleteness", whether past, present, or future; most often it is translated as present or future. 

<sub>
Notes
</sub>


[woc]: https://books.google.com/books?id=jZlwYGilLW0C&lpg=PP1&pg=PA169#v=onepage&q&f=false
[aa]: https://hermeneutics.stackexchange.com/a/27206/3555
<sub>
1. Such phrases generally seem to me (a native English speaker) to be missing a preposition. When there's no apparent alternative, my brain just fills these in. When there is a sensible alternative, as here, my brain favors the option that has all the needed words in place. But of course, my sense of what is "needed" is biased by English. 
</sub> 
 
<sub> 
2. Bruce K. Waltke and Michael P. O’Connor, [*An Introduction to Biblical Hebrew Syntax*][woc] (Eisenbrauns, 1990), p. 169ff.
</sub>
  
<sub>
3. See, e.g., [Conybeare's discussion of Gen 41:21][fcc] τὴν ἀρχήν, meaning "at the beginning". 
</sub>  

<sub>
4. See Pietersma, "To the reader", [NETS Psalms][nets]: "the linguistic relationship of the Greek text to the Hebrew text is one of dependence and subservience."
</sub>

[nets]: http://ccat.sas.upenn.edu/nets/edition/24-ps-nets.pdf
[fcc]: https://books.google.com/books?id=nOuPBAAAQBAJ&lpg=PP1&pg=PA123#v=onepage&q&f=false